jorgensd / dolfinx_mpc

Extension for dolfinx to handle multi-point constraints.
https://jorgensd.github.io/dolfinx_mpc/
MIT License
30 stars 12 forks source link

fails to build with GCC-13 #69

Closed drew-parsons closed 10 months ago

drew-parsons commented 1 year ago

Hi Jorgen, Debian reports that mpc 0.5.0 fails to build with gcc 13,

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037623

The reported error shows up in build-time tests,

[...]
FAILED test_linear_problem.py::test_pipeline[True] - TypeError: create_period...
FAILED test_linear_problem.py::test_pipeline[False] - TypeError: create_perio...
FAILED test_matrix_assembly.py::test_mpc_assembly[celltype0-1-master_point0-C++]
FAILED test_matrix_assembly.py::test_mpc_assembly[celltype0-1-master_point1-C++]
FAILED test_matrix_assembly.py::test_mpc_assembly[celltype0-2-master_point0-C++]
FAILED test_matrix_assembly.py::test_mpc_assembly[celltype0-2-master_point1-C++]
FAILED test_matrix_assembly.py::test_mpc_assembly[celltype0-3-master_point0-C++]
FAILED test_matrix_assembly.py::test_mpc_assembly[celltype0-3-master_point1-C++]
FAILED test_matrix_assembly.py::test_mpc_assembly[celltype1-1-master_point0-C++]
FAILED test_matrix_assembly.py::test_mpc_assembly[celltype1-1-master_point1-C++]
FAILED test_matrix_assembly.py::test_mpc_assembly[celltype1-2-master_point0-C++]
FAILED test_matrix_assembly.py::test_mpc_assembly[celltype1-2-master_point1-C++]
FAILED test_matrix_assembly.py::test_mpc_assembly[celltype1-3-master_point0-C++]
FAILED test_matrix_assembly.py::test_mpc_assembly[celltype1-3-master_point1-C++]
FAILED test_matrix_assembly.py::test_slave_on_same_cell[celltype0-1-master_point0-C++]
FAILED test_matrix_assembly.py::test_slave_on_same_cell[celltype0-1-master_point1-C++]
FAILED test_matrix_assembly.py::test_slave_on_same_cell[celltype0-2-master_point0-C++]
FAILED test_matrix_assembly.py::test_slave_on_same_cell[celltype0-2-master_point1-C++]
FAILED test_matrix_assembly.py::test_slave_on_same_cell[celltype0-3-master_point0-C++]
FAILED test_matrix_assembly.py::test_slave_on_same_cell[celltype0-3-master_point1-C++]
FAILED test_matrix_assembly.py::test_slave_on_same_cell[celltype1-1-master_point0-C++]
FAILED test_matrix_assembly.py::test_slave_on_same_cell[celltype1-1-master_point1-C++]
FAILED test_matrix_assembly.py::test_slave_on_same_cell[celltype1-2-master_point0-C++]
FAILED test_matrix_assembly.py::test_slave_on_same_cell[celltype1-2-master_point1-C++]
FAILED test_matrix_assembly.py::test_slave_on_same_cell[celltype1-3-master_point0-C++]
FAILED test_matrix_assembly.py::test_slave_on_same_cell[celltype1-3-master_point1-C++]
FAILED test_mpc_pipeline.py::test_pipeline[master_point0-C++] - TypeError: __...
FAILED test_mpc_pipeline.py::test_pipeline[master_point1-C++] - TypeError: __...
FAILED test_mpc_pipeline.py::test_linearproblem[master_point0] - TypeError: _...
FAILED test_mpc_pipeline.py::test_linearproblem[master_point1] - TypeError: _...
FAILED test_nonlinear_assembly.py::test_nonlinear_possion[1] - TypeError: cre...
FAILED test_nonlinear_assembly.py::test_nonlinear_possion[2] - TypeError: cre...
FAILED test_nonlinear_assembly.py::test_nonlinear_possion[3] - TypeError: cre...
FAILED test_nonlinear_assembly.py::test_homogenize[1-FiniteElement] - TypeErr...
FAILED test_nonlinear_assembly.py::test_homogenize[1-VectorElement] - TypeErr...
FAILED test_nonlinear_assembly.py::test_homogenize[2-FiniteElement] - TypeErr...
FAILED test_nonlinear_assembly.py::test_homogenize[2-VectorElement] - TypeErr...
FAILED test_nonlinear_assembly.py::test_homogenize[3-FiniteElement] - TypeErr...
FAILED test_nonlinear_assembly.py::test_homogenize[3-VectorElement] - TypeErr...
FAILED test_rectangular_assembly.py::test_mixed_element[ghost_mode0-cell_type0]
FAILED test_rectangular_assembly.py::test_mixed_element[ghost_mode0-cell_type1]
FAILED test_rectangular_assembly.py::test_mixed_element[ghost_mode1-cell_type0]
FAILED test_rectangular_assembly.py::test_mixed_element[ghost_mode1-cell_type1]
FAILED test_surface_integral.py::test_surface_integrals[C++] - TypeError: __i...
FAILED test_surface_integral.py::test_surface_integral_dependency[C++] - Type...
FAILED test_vector_assembly.py::test_mpc_assembly[celltype0-1-master_point0-C++]
FAILED test_vector_assembly.py::test_mpc_assembly[celltype0-1-master_point1-C++]
FAILED test_vector_assembly.py::test_mpc_assembly[celltype0-2-master_point0-C++]
FAILED test_vector_assembly.py::test_mpc_assembly[celltype0-2-master_point1-C++]
FAILED test_vector_assembly.py::test_mpc_assembly[celltype0-3-master_point0-C++]
FAILED test_vector_assembly.py::test_mpc_assembly[celltype0-3-master_point1-C++]
FAILED test_vector_assembly.py::test_mpc_assembly[celltype1-1-master_point0-C++]
FAILED test_vector_assembly.py::test_mpc_assembly[celltype1-1-master_point1-C++]
FAILED test_vector_assembly.py::test_mpc_assembly[celltype1-2-master_point0-C++]
FAILED test_vector_assembly.py::test_mpc_assembly[celltype1-2-master_point1-C++]
FAILED test_vector_assembly.py::test_mpc_assembly[celltype1-3-master_point0-C++]
FAILED test_vector_assembly.py::test_mpc_assembly[celltype1-3-master_point1-C++]
FAILED test_vector_poisson.py::test_vector_possion[0-0-2-4-C++] - TypeError: ...
FAILED test_vector_poisson.py::test_vector_possion[0-0-3-4-C++] - TypeError: ...
FAILED test_vector_poisson.py::test_vector_possion[0-1-2-4-C++] - TypeError: ...
FAILED test_vector_poisson.py::test_vector_possion[0-1-3-4-C++] - TypeError: ...
FAILED test_vector_poisson.py::test_vector_possion[1-0-2-4-C++] - TypeError: ...
FAILED test_vector_poisson.py::test_vector_possion[1-0-3-4-C++] - TypeError: ...
FAILED test_vector_poisson.py::test_vector_possion[1-1-2-4-C++] - TypeError: ...
FAILED test_vector_poisson.py::test_vector_possion[1-1-3-4-C++] - TypeError: ...
============================= 69 failed in 12.85s ==============================

Full log at http://qa-logs.debian.net/2023/05/22/logs/dolfinx-mpc_0.5.0.post0-2_unstable_gccexp.log

mpc version 0.5.0 and 0.6.0 are both building fine with gcc 12, see https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/dolfinx-mpc.html

The error report is for mpc 0.5.0, I haven't tested git head. I haven't tested mpc 0.6.0 with gcc 13 either.

drew-parsons commented 1 year ago

The issue is not specific to dolfinx_mpc. It's also reported against dolfinx now, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037649 Likely there's some simple action or gcc flag that needs to be applied to many packages.

Some gcc-13 issues are discussed at https://gcc.gnu.org/gcc-13/porting_to.html, though not clear that that addresses the issue here.

drew-parsons commented 1 year ago

For reference, scipy is also affected, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037854. So it's a general problem that all packages need to deal with, not such a big drama really.

drew-parsons commented 1 year ago

Incidentally, after patching basix and dolfinx for gcc-13, dolfinx-mpc builds and runs fine against them. So I don't think this issue is substantive for dolfinx-mpc. Just need to keep the toolchain built consistently. The gcc-13 patches (in basix,dolfinx), appear to introduce ABI changes (e.g. due to int32_t→int) that cause dolfinx_mpc to fail if built against dolfinx without the patches. Rebuilding dolfinx-mpc against the patched libdolfinx.so seems to sort out the issue, so dolfinx-mpc itself doesn't need patching.

drew-parsons commented 10 months ago

dolfinx-mpc 0.6 built with gcc 13, so let's close this issue now.