Issue with demo_laplacian.py

no worries, we must get clang to work one way or another. We cannot afford skipping it, it is the one of the major compilers.

the issue with clang+SuperLU is now fixed in the master branch in git:

https://git.savannah.nongnu.org/gitweb/?p=getfem.git

if you fetch the latest version from git you only need to run

./autogen.sh

to generate the configure script.

Thank you for being so effective.

So, everything seemed to work well, until I made a make check and obtained the following output (so it seems that in this case, also some files of the C++ interface do not pass):

clang++: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument]
ld: warning: -bind_at_load is deprecated on macOS
ld: warning: -ld_classic is deprecated and will be removed in a future release
/Applications/Xcode.app/Contents/Developer/usr/bin/make  check-TESTS
PASS: dynamic_array.pl
PASS: dynamic_tas.pl
PASS: test_int_set.pl
PASS: test_tree_sorted.pl
PASS: poly.pl
PASS: test_small_vector.pl
PASS: test_kdtree.pl
PASS: test_rtree.pl
FAIL: geo_trans_inv.pl
FAIL: test_mesh.pl
PASS: test_interpolation.pl
FAIL: test_mat_elem.pl
PASS: test_slice.pl
FAIL: integration.pl
FAIL: test_assembly.pl
FAIL: test_assembly_assignment.pl
PASS: test_interpolated_fem.pl
PASS: test_internal_variables.pl
FAIL: test_condensation.pl
FAIL: test_range_basis.pl
FAIL: laplacian.pl
FAIL: laplacian_with_bricks.pl
FAIL: elastostatic.pl
FAIL: stokes.pl
FAIL: plate.pl
FAIL: test_mesh_im_level_set.pl
FAIL: crack.pl
FAIL: thermo_elasticity_electrical_coupling.pl
FAIL: test_mesh_generation.pl
FAIL: nonlinear_elastostatic.pl
FAIL: nonlinear_membrane.pl
FAIL: test_continuation.pl
FAIL: plasticity.pl
FAIL: helmholtz.pl
FAIL: schwarz_additive.pl
FAIL: bilaplacian.pl
PASS: heat_equation.pl
PASS: wave_equation.pl
FAIL: test_gmm_matrix_functions.pl
PASS: cyl_slicer.pl
PASS: make_gmm_test.pl
============================================================================
Testsuite summary for getfem 5.4.3
============================================================================
# TOTAL: 41
# PASS:  16
# SKIP:  0
# XFAIL: 0
# FAIL:  25
# XPASS: 0
# ERROR: 0
============================================================================
See tests/test-suite.log for debugging.
============================================================================
make[3]: *** [test-suite.log] Error 1
make[2]: *** [check-TESTS] Error 2
make[1]: *** [check-am] Error 2
make: *** [check-recursive] Error 1

These are the contents of test-suite.log:

========================================
   getfem 5.4.3: tests/test-suite.log
========================================

# TOTAL: 41
# PASS:  16
# SKIP:  0
# XFAIL: 0
# FAIL:  25
# XPASS: 0
# ERROR: 0

System information (uname -a): Darwin 24.2.0 Darwin Kernel Version 24.2.0: Fri Dec 6 19:03:40 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6041

.. contents:: :depth: 2

FAIL: geo_trans_inv.pl
======================

FAIL geo_trans_inv.pl (exit status: 1)

FAIL: test_mesh.pl
==================

FAIL test_mesh.pl (exit status: 1)

FAIL: test_mat_elem.pl
======================

FAIL test_mat_elem.pl (exit status: 1)

FAIL: integration.pl
====================

FAIL integration.pl (exit status: 1)

FAIL: test_assembly.pl
======================

FAIL test_assembly.pl (exit status: 1)

FAIL: test_assembly_assignment.pl
=================================

Trace 1 in test_assembly_assignment.cc, line 26: Running sequential Getfem
FAIL test_assembly_assignment.pl (exit status: 1)

FAIL: test_condensation.pl
==========================

Trace 1 in test_condensation.cc, line 33: Running sequential Getfem
Displacement dofs: 12
Total dofs of model 1: 24
Total dofs of model 2: 12
SOLVING MODEL 1 (without internal variables)
Trace 2 in getfem_models.cc, line 3308: Generic source term assembly
Trace 2 in getfem_models.cc, line 3319:  (source term): generic source term assembly
Trace 2 in getfem_models.cc, line 2652: Global generic assembly RHS
 iter   0 residual            1
Trace 2 in getfem_models.cc, line 2654: Global generic assembly tangent term
FAIL test_condensation.pl (exit status: 1)

FAIL: test_range_basis.pl
=========================

./test_range_basis /var/folders/6r/4ydrbbqd4_n26t27gjl3c8w00000gn/T/test_range_basis.param_97  2>&1 failed
FAIL test_range_basis.pl (exit status: 1)

FAIL: laplacian.pl
==================

./laplacian /var/folders/6r/4ydrbbqd4_n26t27gjl3c8w00000gn/T/laplacian.param_405  2>&1 failed
FAIL laplacian.pl (exit status: 1)

FAIL: laplacian_with_bricks.pl
==============================

......sh: line 1: 18170 Segmentation fault: 11  ./laplacian_with_bricks /var/folders/6r/4ydrbbqd4_n26t27gjl3c8w00000gn/T/laplacian.param_356 -d 'MESH_TYPE="GT_QK(2,1)"' -d 'FEM_TYPE="FEM_QK(2,1)"' -d 'INTEGRATION="IM_NC_PARALLELEPIPED(2,2)"' 2>&1
./laplacian_with_bricks /var/folders/6r/4ydrbbqd4_n26t27gjl3c8w00000gn/T/laplacian.param_356 -d 'MESH_TYPE="GT_QK(2,1)"' -d 'FEM_TYPE="FEM_QK(2,1)"' -d 'INTEGRATION="IM_NC_PARALLELEPIPED(2,2)"' 2>&1 failed
FAIL laplacian_with_bricks.pl (exit status: 1)

FAIL: elastostatic.pl
=====================

./elastostatic /var/folders/6r/4ydrbbqd4_n26t27gjl3c8w00000gn/T/elas.param_955  2>&1 failed
FAIL elastostatic.pl (exit status: 1)

FAIL: stokes.pl
===============

FAIL stokes.pl (exit status: 1)

FAIL: plate.pl
==============

FAIL plate.pl (exit status: 1)

FAIL: test_mesh_im_level_set.pl
===============================

FAIL test_mesh_im_level_set.pl (exit status: 1)

FAIL: crack.pl
==============

FAIL crack.pl (exit status: 1)

FAIL: thermo_elasticity_electrical_coupling.pl
==============================================

FAIL thermo_elasticity_electrical_coupling.pl (exit status: 1)

FAIL: test_mesh_generation.pl
=============================

FAIL test_mesh_generation.pl (exit status: 1)

FAIL: nonlinear_elastostatic.pl
===============================

FAIL nonlinear_elastostatic.pl (exit status: 1)

FAIL: nonlinear_membrane.pl
===========================

FAIL nonlinear_membrane.pl (exit status: 1)

FAIL: test_continuation.pl
==========================


Wrong number of bifurcation points
FAIL test_continuation.pl (exit status: 1)

FAIL: plasticity.pl
===================

FAIL plasticity.pl (exit status: 1)

FAIL: helmholtz.pl
==================

FAIL helmholtz.pl (exit status: 1)

FAIL: schwarz_additive.pl
=========================

FAIL schwarz_additive.pl (exit status: 1)

FAIL: bilaplacian.pl
====================

./bilaplacian /var/folders/6r/4ydrbbqd4_n26t27gjl3c8w00000gn/T/elas.param_314  2>&1 failed
FAIL bilaplacian.pl (exit status: 1)

FAIL: test_gmm_matrix_functions.pl
==================================

FAIL test_gmm_matrix_functions.pl (exit status: 1)


Also, when trying to run python demo_laplacian.py, on the other hand, I get

*** GetFEM view of the workspace:
message from gf_workspace follow:
Workspace 0 [main -- 7 objects]
 ID   0               gfMesh          
 ID   1            gfMeshFem           depends on  ID0
 ID   2            gfMeshFem           depends on  ID0
 ID   3                gfFem          
 ID   4              gfInteg          
 ID   5             gfMeshIm           depends on  ID0
 ID   6              gfModel           depends on  ID1 ID5 ID2


*** Python view of the workspace:
<class 'getfem.getfem.Mesh'> class 8, id 0 : instances=1
<class 'getfem.getfem.MeshFem'> class 9, id 1 : instances=1
<class 'getfem.getfem.MeshFem'> class 9, id 2 : instances=1
<class 'getfem.getfem.MeshIm'> class 10, id 5 : instances=1
<class 'getfem.getfem.Model'> class 14, id 6 : instances=1
Trace 2 in getfem_models.cc, line 4399: Mass term assembly for Dirichlet condition
Trace 2 in getfem_models.cc, line 4436: Source term assembly for Dirichlet condition
zsh: segmentation fault  python demo_laplacian.py

ok let’s start with the C++ examples first.

Enter the “tests” folder
cd tests
and run the integration test with

./integration

and let me know what the output is

(same tests pass on my system)

Here’s the output of ./integration:

nbpts=methode : IM_GAUSS1D(0)
Nb points on convex 1
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 1	 point : [0.5]
Coeff 1 : 1	 point : [1]
Coeff 2 : 1	 point : [0]


methode : IM_GAUSS1D(2)
Nb points on convex 2
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.5	 point : [0.21132487]
Coeff 1 : 0.5	 point : [0.78867513]
Coeff 2 : 1	 point : [1]
Coeff 3 : 1	 point : [0]


methode : IM_GAUSS1D(4)
Nb points on convex 3
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.27777778	 point : [0.11270167]
Coeff 1 : 0.44444444	 point : [0.5]
Coeff 2 : 0.27777778	 point : [0.88729833]
Coeff 3 : 1	 point : [1]
Coeff 4 : 1	 point : [0]


methode : IM_GAUSS1D(6)
Nb points on convex 4
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.17392742	 point : [0.069431844]
Coeff 1 : 0.32607258	 point : [0.33000948]
Coeff 2 : 0.32607258	 point : [0.66999052]
Coeff 3 : 0.17392742	 point : [0.93056816]
Coeff 4 : 1	 point : [1]
Coeff 5 : 1	 point : [0]


methode : IM_GAUSS1D(8)
Nb points on convex 5
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.11846344	 point : [0.046910077]
Coeff 1 : 0.23931434	 point : [0.23076534]
Coeff 2 : 0.28444444	 point : [0.5]
Coeff 3 : 0.23931434	 point : [0.76923466]
Coeff 4 : 0.11846344	 point : [0.95308992]
Coeff 5 : 1	 point : [1]
Coeff 6 : 1	 point : [0]


methode : IM_GAUSS1D(10)
Nb points on convex 6
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.085662246	 point : [0.033765243]
Coeff 1 : 0.18038079	 point : [0.16939531]
Coeff 2 : 0.23395697	 point : [0.38069041]
Coeff 3 : 0.23395697	 point : [0.61930959]
Coeff 4 : 0.18038079	 point : [0.83060469]
Coeff 5 : 0.085662246	 point : [0.96623476]
Coeff 6 : 1	 point : [1]
Coeff 7 : 1	 point : [0]


methode : IM_GAUSS1D(12)
Nb points on convex 7
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.064742483	 point : [0.025446044]
Coeff 1 : 0.1398527	 point : [0.12923441]
Coeff 2 : 0.19091503	 point : [0.29707742]
Coeff 3 : 0.20897959	 point : [0.5]
Coeff 4 : 0.19091503	 point : [0.70292258]
Coeff 5 : 0.1398527	 point : [0.87076559]
Coeff 6 : 0.064742483	 point : [0.97455396]
Coeff 7 : 1	 point : [1]
Coeff 8 : 1	 point : [0]


methode : IM_GAUSS1D(14)
Nb points on convex 8
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.050614268	 point : [0.019855072]
Coeff 1 : 0.11119052	 point : [0.10166676]
Coeff 2 : 0.15685332	 point : [0.2372338]
Coeff 3 : 0.18134189	 point : [0.40828268]
Coeff 4 : 0.18134189	 point : [0.59171732]
Coeff 5 : 0.15685332	 point : [0.7627662]
Coeff 6 : 0.11119052	 point : [0.89833324]
Coeff 7 : 0.050614268	 point : [0.98014493]
Coeff 8 : 1	 point : [1]
Coeff 9 : 1	 point : [0]


methode : IM_GAUSS1D(16)
Nb points on convex 9
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.040637194	 point : [0.01591988]
Coeff 1 : 0.09032408	 point : [0.081984446]
Coeff 2 : 0.13030535	 point : [0.19331428]
Coeff 3 : 0.15617354	 point : [0.33787329]
Coeff 4 : 0.16511968	 point : [0.5]
Coeff 5 : 0.15617354	 point : [0.66212671]
Coeff 6 : 0.13030535	 point : [0.80668572]
Coeff 7 : 0.09032408	 point : [0.91801555]
Coeff 8 : 0.040637194	 point : [0.98408012]
Coeff 9 : 1	 point : [1]
Coeff 10 : 1	 point : [0]


methode : IM_GAUSS1D(18)
Nb points on convex 10
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.033335672	 point : [0.013046736]
Coeff 1 : 0.074725675	 point : [0.067468317]
Coeff 2 : 0.10954318	 point : [0.16029522]
Coeff 3 : 0.13463336	 point : [0.2833023]
Coeff 4 : 0.14776211	 point : [0.42556283]
Coeff 5 : 0.14776211	 point : [0.57443717]
Coeff 6 : 0.13463336	 point : [0.7166977]
Coeff 7 : 0.10954318	 point : [0.83970478]
Coeff 8 : 0.074725675	 point : [0.93253168]
Coeff 9 : 0.033335672	 point : [0.98695326]
Coeff 10 : 1	 point : [1]
Coeff 11 : 1	 point : [0]


methode : IM_GAUSS1D(20)
Nb points on convex 11
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.027834284	 point : [0.010885671]
Coeff 1 : 0.062790185	 point : [0.0564687]
Coeff 2 : 0.093145105	 point : [0.134924]
Coeff 3 : 0.11659688	 point : [0.24045194]
Coeff 4 : 0.13140227	 point : [0.36522842]
Coeff 5 : 0.13646254	 point : [0.5]
Coeff 6 : 0.13140227	 point : [0.63477158]
Coeff 7 : 0.11659688	 point : [0.75954806]
Coeff 8 : 0.093145105	 point : [0.865076]
Coeff 9 : 0.062790185	 point : [0.9435313]
Coeff 10 : 0.027834284	 point : [0.98911433]
Coeff 11 : 1	 point : [1]
Coeff 12 : 1	 point : [0]


methode : IM_GAUSS1D(22)
Nb points on convex 12
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.023587668	 point : [0.0092196829]
Coeff 1 : 0.053469663	 point : [0.047941372]
Coeff 2 : 0.080039164	 point : [0.11504866]
Coeff 3 : 0.10158371	 point : [0.20634102]
Coeff 4 : 0.11674627	 point : [0.31608425]
Coeff 5 : 0.12457352	 point : [0.4373833]
Coeff 6 : 0.12457352	 point : [0.5626167]
Coeff 7 : 0.11674627	 point : [0.68391575]
Coeff 8 : 0.10158371	 point : [0.79365898]
Coeff 9 : 0.080039164	 point : [0.88495134]
Coeff 10 : 0.053469663	 point : [0.95205863]
Coeff 11 : 0.023587668	 point : [0.99078032]
Coeff 12 : 1	 point : [1]
Coeff 13 : 1	 point : [0]


methode : IM_GAUSS1D(24)
Nb points on convex 13
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.020242002	 point : [0.0079084726]
Coeff 1 : 0.04606075	 point : [0.0412008]
Coeff 2 : 0.069436755	 point : [0.099210955]
Coeff 3 : 0.08907299	 point : [0.17882533]
Coeff 4 : 0.10390802	 point : [0.27575362]
Coeff 5 : 0.11314159	 point : [0.38477084]
Coeff 6 : 0.11627578	 point : [0.5]
Coeff 7 : 0.11314159	 point : [0.61522916]
Coeff 8 : 0.10390802	 point : [0.72424638]
Coeff 9 : 0.08907299	 point : [0.82117467]
Coeff 10 : 0.069436755	 point : [0.90078905]
Coeff 11 : 0.04606075	 point : [0.9587992]
Coeff 12 : 0.020242002	 point : [0.99209153]
Coeff 13 : 1	 point : [1]
Coeff 14 : 1	 point : [0]


methode : IM_GAUSS1D(26)
Nb points on convex 14
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.01755973	 point : [0.0068580957]
Coeff 1 : 0.040079044	 point : [0.035782558]
Coeff 2 : 0.060759285	 point : [0.086399342]
Coeff 3 : 0.078601584	 point : [0.15635355]
Coeff 4 : 0.092769199	 point : [0.24237568]
Coeff 5 : 0.10259923	 point : [0.34044382]
Coeff 6 : 0.10763193	 point : [0.44597253]
Coeff 7 : 0.10763193	 point : [0.55402747]
Coeff 8 : 0.10259923	 point : [0.65955618]
Coeff 9 : 0.092769199	 point : [0.75762432]
Coeff 10 : 0.078601584	 point : [0.84364645]
Coeff 11 : 0.060759285	 point : [0.91360066]
Coeff 12 : 0.040079044	 point : [0.96421744]
Coeff 13 : 0.01755973	 point : [0.9931419]
Coeff 14 : 1	 point : [1]
Coeff 15 : 1	 point : [0]


zsh: segmentation fault  ./integration

please try to rebuild the system with

CXXFLAGS=“-g -fsanitize=address -fsanitize=undefined”

added to the configure command, and rerun the integration test.

Then try to add also

--with-optimization=-O1

to the configure command. You can also test other levels of optimization like “O0” or “O2”.

With --with-optimization=-01, this is what I obtain:


methode : IM_GAUSS1D(26)
Nb points on convex 14
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.01755973	 point : [0.0068580957]
Coeff 1 : 0.040079044	 point : [0.035782558]
Coeff 2 : 0.060759285	 point : [0.086399342]
Coeff 3 : 0.078601584	 point : [0.15635355]
Coeff 4 : 0.092769199	 point : [0.24237568]
Coeff 5 : 0.10259923	 point : [0.34044382]
Coeff 6 : 0.10763193	 point : [0.44597253]
Coeff 7 : 0.10763193	 point : [0.55402747]
Coeff 8 : 0.10259923	 point : [0.65955618]
Coeff 9 : 0.092769199	 point : [0.75762432]
Coeff 10 : 0.078601584	 point : [0.84364645]
Coeff 11 : 0.060759285	 point : [0.91360066]
Coeff 12 : 0.040079044	 point : [0.96421744]
Coeff 13 : 0.01755973	 point : [0.9931419]
Coeff 14 : 1	 point : [1]
Coeff 15 : 1	 point : [0]


AddressSanitizer:DEADLYSIGNAL
=================================================================
==54974==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x0001a10141b4 bp 0x00016d049cc0 sp 0x00016d049b70 T0)
==54974==The signal is caused by a READ memory access.
==54974==Hint: address points to the zero page.
    #0 0x1a10141b4 in DGETRF+0x2c (libLAPACK.dylib:arm64e+0x11b4)
    #1 0x1076e3788 in gmm::lu_factor(gmm::dense_matrix<double>&, std::__1::vector<int, std::__1::allocator<int>>&) gmm_lapack_interface.h:113
    #2 0x1076c46bc in double gmm::lu_det<double>(gmm::dense_matrix<double> const&) gmm_opt.h:65
    #3 0x107e44a30 in getfem::quasi_polar_integration::quasi_polar_integration(std::__1::shared_ptr<getfem::approx_integration const>, unsigned long, unsigned long) getfem_integration.cc:987
    #4 0x107e41d78 in void std::__1::allocator<getfem::quasi_polar_integration>::construct[abi:ne180100]<getfem::quasi_polar_integration, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&>(getfem::quasi_polar_integration*, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&) allocator.h:173
    #5 0x107e41554 in std::__1::__shared_ptr_emplace<getfem::quasi_polar_integration, std::__1::allocator<getfem::quasi_polar_integration>>::__shared_ptr_emplace[abi:ne180100]<std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&, std::__1::allocator<getfem::quasi_polar_integration>, 0>(std::__1::allocator<getfem::quasi_polar_integration>, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&) shared_ptr.h:265
    #6 0x107e40dd4 in std::__1::shared_ptr<getfem::quasi_polar_integration> std::__1::allocate_shared[abi:ne180100]<getfem::quasi_polar_integration, std::__1::allocator<getfem::quasi_polar_integration>, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&, void>(std::__1::allocator<getfem::quasi_polar_integration> const&, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&) shared_ptr.h:823
    #7 0x107e30f04 in getfem::quasi_polar(std::__1::deque<dal::naming_system<getfem::integration_method>::parameter, std::__1::allocator<dal::naming_system<getfem::integration_method>::parameter>>&, std::__1::vector<std::__1::shared_ptr<dal::static_stored_object const>, std::__1::allocator<std::__1::shared_ptr<dal::static_stored_object const>>>&) getfem_integration.cc:1067
    #8 0x107e55110 in dal::naming_system<getfem::integration_method>::method_(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned long&, bool) dal_naming_system.h:296
    #9 0x107e0f964 in dal::naming_system<getfem::integration_method>::method(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned long&, bool) dal_naming_system.h:120
    #10 0x107e08c7c in getfem::int_method_descriptor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool) getfem_integration.cc:1141
    #11 0x102db6458 in main integration.cc:467
    #12 0x192e44270  (<unknown module>)

==54974==Register values:
 x[0] = 0x000000016d049eb0   x[1] = 0x0000000000000000   x[2] = 0xffffffffffffffcc   x[3] = 0x000000702da2934c  
 x[4] = 0x000000702da293c0   x[5] = 0x0000000000000001   x[6] = 0x0000000000000003   x[7] = 0x0000000000000001  
 x[8] = 0x0000000000000000   x[9] = 0x0000607000009be0  x[10] = 0x0000607000009be0  x[11] = 0x000000002da09350  
x[12] = 0x0000000000000000  x[13] = 0x0000607000009be0  x[14] = 0x0000000000000001  x[15] = 0x0000000000000000  
x[16] = 0x00000001a1014188  x[17] = 0x00000001035205e0  x[18] = 0x0000000000000000  x[19] = 0x000000016d049d60  
x[20] = 0x0000007000020000  x[21] = 0x0000000000000001  x[22] = 0x000000002da093aa  x[23] = 0x000000016d049d20  
x[24] = 0x000000016d049d30  x[25] = 0x000000016d049d50  x[26] = 0x000000000004ff70  x[27] = 0x000000016d049d00  
x[28] = 0x000000702da293a0     fp = 0x000000016d049cc0     lr = 0x00000001076e378c     sp = 0x000000016d049b70  
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (libLAPACK.dylib:arm64e+0x11b4) in DGETRF+0x2c
==54974==ABORTING
zsh: abort      ./integration

And this is the output using --with-optimization=-O0

methode : IM_GAUSS1D(26)
Nb points on convex 14
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.01755973	 point : [0.0068580957]
Coeff 1 : 0.040079044	 point : [0.035782558]
Coeff 2 : 0.060759285	 point : [0.086399342]
Coeff 3 : 0.078601584	 point : [0.15635355]
Coeff 4 : 0.092769199	 point : [0.24237568]
Coeff 5 : 0.10259923	 point : [0.34044382]
Coeff 6 : 0.10763193	 point : [0.44597253]
Coeff 7 : 0.10763193	 point : [0.55402747]
Coeff 8 : 0.10259923	 point : [0.65955618]
Coeff 9 : 0.092769199	 point : [0.75762432]
Coeff 10 : 0.078601584	 point : [0.84364645]
Coeff 11 : 0.060759285	 point : [0.91360066]
Coeff 12 : 0.040079044	 point : [0.96421744]
Coeff 13 : 0.01755973	 point : [0.9931419]
Coeff 14 : 1	 point : [1]
Coeff 15 : 1	 point : [0]


AddressSanitizer:DEADLYSIGNAL
=================================================================
==74358==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x0001a10141b4 bp 0x00016d0e3580 sp 0x00016d0e3430 T0)
==74358==The signal is caused by a READ memory access.
==74358==Hint: address points to the zero page.
    #0 0x1a10141b4 in DGETRF+0x2c (libLAPACK.dylib:arm64e+0x11b4)
    #1 0x10bc8d014 in gmm::lu_factor(gmm::dense_matrix<double>&, std::__1::vector<int, std::__1::allocator<int>>&) gmm_lapack_interface.h:113
    #2 0x10bc37f8c in double gmm::lu_det<double>(gmm::dense_matrix<double> const&) gmm_opt.h:65
    #3 0x10ce66b14 in getfem::quasi_polar_integration::quasi_polar_integration(std::__1::shared_ptr<getfem::approx_integration const>, unsigned long, unsigned long) getfem_integration.cc:987
    #4 0x10ce6126c in getfem::quasi_polar_integration::quasi_polar_integration(std::__1::shared_ptr<getfem::approx_integration const>, unsigned long, unsigned long) getfem_integration.cc:860
    #5 0x10ce610b0 in void std::__1::allocator<getfem::quasi_polar_integration>::construct[abi:ne180100]<getfem::quasi_polar_integration, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&>(getfem::quasi_polar_integration*, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&) allocator.h:173
    #6 0x10ce60560 in void std::__1::allocator_traits<std::__1::allocator<getfem::quasi_polar_integration>>::construct[abi:ne180100]<getfem::quasi_polar_integration, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&, void>(std::__1::allocator<getfem::quasi_polar_integration>&, getfem::quasi_polar_integration*, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&) allocator_traits.h:296
    #7 0x10ce60108 in std::__1::__shared_ptr_emplace<getfem::quasi_polar_integration, std::__1::allocator<getfem::quasi_polar_integration>>::__shared_ptr_emplace[abi:ne180100]<std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&, std::__1::allocator<getfem::quasi_polar_integration>, 0>(std::__1::allocator<getfem::quasi_polar_integration>, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&) shared_ptr.h:265
    #8 0x10ce5f168 in std::__1::__shared_ptr_emplace<getfem::quasi_polar_integration, std::__1::allocator<getfem::quasi_polar_integration>>::__shared_ptr_emplace[abi:ne180100]<std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&, std::__1::allocator<getfem::quasi_polar_integration>, 0>(std::__1::allocator<getfem::quasi_polar_integration>, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&) shared_ptr.h:262
    #9 0x10ce5ecdc in std::__1::shared_ptr<getfem::quasi_polar_integration> std::__1::allocate_shared[abi:ne180100]<getfem::quasi_polar_integration, std::__1::allocator<getfem::quasi_polar_integration>, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&, void>(std::__1::allocator<getfem::quasi_polar_integration> const&, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&) shared_ptr.h:823
    #10 0x10ce5e88c in std::__1::shared_ptr<getfem::quasi_polar_integration> std::__1::make_shared[abi:ne180100]<getfem::quasi_polar_integration, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&, void>(std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&) shared_ptr.h:831
    #11 0x10ce37e18 in getfem::quasi_polar(std::__1::deque<dal::naming_system<getfem::integration_method>::parameter, std::__1::allocator<dal::naming_system<getfem::integration_method>::parameter>>&, std::__1::vector<std::__1::shared_ptr<dal::static_stored_object const>, std::__1::allocator<std::__1::shared_ptr<dal::static_stored_object const>>>&) getfem_integration.cc:1067
    #12 0x10ce88bf4 in dal::naming_system<getfem::integration_method>::method_(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned long&, bool) dal_naming_system.h:296
    #13 0x10cde966c in dal::naming_system<getfem::integration_method>::method(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned long&, bool) dal_naming_system.h:120
    #14 0x10cde0c70 in getfem::int_method_descriptor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool) getfem_integration.cc:1141
    #15 0x102d21a24 in print_some_methods() integration.cc:443
    #16 0x102d1d138 in main integration.cc:467
    #17 0x192e44270  (<unknown module>)

==74358==Register values:
 x[0] = 0x000060200004ff70   x[1] = 0x0000000000000000   x[2] = 0xffffffffffffffec   x[3] = 0x000000702da3c62c  
 x[4] = 0x000000702da3c680   x[5] = 0x0000000000000000   x[6] = 0x0000607000009be0   x[7] = 0x0000000000000001  
 x[8] = 0x000000016d0e3610   x[9] = 0x000000016d0e3590  x[10] = 0x000000016d0e3600  x[11] = 0x0000607000009be0  
x[12] = 0x000000016d0e35f0  x[13] = 0x000000016d0e35e0  x[14] = 0xf3f3f300f1f1f1f1  x[15] = 0x000000016d0e1540  
x[16] = 0x00000001a1014188  x[17] = 0x00000001037b85e0  x[18] = 0x0000000000000000  x[19] = 0x000000016d0e3620  
x[20] = 0x00000001fc8080a0  x[21] = 0x0000000000000000  x[22] = 0x000000016d0eb698  x[23] = 0x000000016d0eb698  
x[24] = 0x0000000192e3e000  x[25] = 0x0000000000000000  x[26] = 0x0000000000000000  x[27] = 0x0000000000000000  
x[28] = 0x0000000000000000     fp = 0x000000016d0e3580     lr = 0x000000010bc8d018     sp = 0x000000016d0e3430  
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (libLAPACK.dylib:arm64e+0x11b4) in DGETRF+0x2c
==74358==ABORTING
zsh: abort      ./integration

I was forgetting the output with no “optimization” option:

integration(20800,0x1f68e0240) malloc: nano zone abandoned due to inability to reserve vm space.
nbpts=methode : IM_GAUSS1D(0)
Nb points on convex 1
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 1	 point : [0.5]
Coeff 1 : 1	 point : [1]
Coeff 2 : 1	 point : [0]


methode : IM_GAUSS1D(2)
Nb points on convex 2
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.5	 point : [0.21132487]
Coeff 1 : 0.5	 point : [0.78867513]
Coeff 2 : 1	 point : [1]
Coeff 3 : 1	 point : [0]


methode : IM_GAUSS1D(4)
Nb points on convex 3
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.27777778	 point : [0.11270167]
Coeff 1 : 0.44444444	 point : [0.5]
Coeff 2 : 0.27777778	 point : [0.88729833]
Coeff 3 : 1	 point : [1]
Coeff 4 : 1	 point : [0]


methode : IM_GAUSS1D(6)
Nb points on convex 4
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.17392742	 point : [0.069431844]
Coeff 1 : 0.32607258	 point : [0.33000948]
Coeff 2 : 0.32607258	 point : [0.66999052]
Coeff 3 : 0.17392742	 point : [0.93056816]
Coeff 4 : 1	 point : [1]
Coeff 5 : 1	 point : [0]


methode : IM_GAUSS1D(8)
Nb points on convex 5
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.11846344	 point : [0.046910077]
Coeff 1 : 0.23931434	 point : [0.23076534]
Coeff 2 : 0.28444444	 point : [0.5]
Coeff 3 : 0.23931434	 point : [0.76923466]
Coeff 4 : 0.11846344	 point : [0.95308992]
Coeff 5 : 1	 point : [1]
Coeff 6 : 1	 point : [0]


methode : IM_GAUSS1D(10)
Nb points on convex 6
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.085662246	 point : [0.033765243]
Coeff 1 : 0.18038079	 point : [0.16939531]
Coeff 2 : 0.23395697	 point : [0.38069041]
Coeff 3 : 0.23395697	 point : [0.61930959]
Coeff 4 : 0.18038079	 point : [0.83060469]
Coeff 5 : 0.085662246	 point : [0.96623476]
Coeff 6 : 1	 point : [1]
Coeff 7 : 1	 point : [0]


methode : IM_GAUSS1D(12)
Nb points on convex 7
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.064742483	 point : [0.025446044]
Coeff 1 : 0.1398527	 point : [0.12923441]
Coeff 2 : 0.19091503	 point : [0.29707742]
Coeff 3 : 0.20897959	 point : [0.5]
Coeff 4 : 0.19091503	 point : [0.70292258]
Coeff 5 : 0.1398527	 point : [0.87076559]
Coeff 6 : 0.064742483	 point : [0.97455396]
Coeff 7 : 1	 point : [1]
Coeff 8 : 1	 point : [0]


methode : IM_GAUSS1D(14)
Nb points on convex 8
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.050614268	 point : [0.019855072]
Coeff 1 : 0.11119052	 point : [0.10166676]
Coeff 2 : 0.15685332	 point : [0.2372338]
Coeff 3 : 0.18134189	 point : [0.40828268]
Coeff 4 : 0.18134189	 point : [0.59171732]
Coeff 5 : 0.15685332	 point : [0.7627662]
Coeff 6 : 0.11119052	 point : [0.89833324]
Coeff 7 : 0.050614268	 point : [0.98014493]
Coeff 8 : 1	 point : [1]
Coeff 9 : 1	 point : [0]


methode : IM_GAUSS1D(16)
Nb points on convex 9
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.040637194	 point : [0.01591988]
Coeff 1 : 0.09032408	 point : [0.081984446]
Coeff 2 : 0.13030535	 point : [0.19331428]
Coeff 3 : 0.15617354	 point : [0.33787329]
Coeff 4 : 0.16511968	 point : [0.5]
Coeff 5 : 0.15617354	 point : [0.66212671]
Coeff 6 : 0.13030535	 point : [0.80668572]
Coeff 7 : 0.09032408	 point : [0.91801555]
Coeff 8 : 0.040637194	 point : [0.98408012]
Coeff 9 : 1	 point : [1]
Coeff 10 : 1	 point : [0]


methode : IM_GAUSS1D(18)
Nb points on convex 10
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.033335672	 point : [0.013046736]
Coeff 1 : 0.074725675	 point : [0.067468317]
Coeff 2 : 0.10954318	 point : [0.16029522]
Coeff 3 : 0.13463336	 point : [0.2833023]
Coeff 4 : 0.14776211	 point : [0.42556283]
Coeff 5 : 0.14776211	 point : [0.57443717]
Coeff 6 : 0.13463336	 point : [0.7166977]
Coeff 7 : 0.10954318	 point : [0.83970478]
Coeff 8 : 0.074725675	 point : [0.93253168]
Coeff 9 : 0.033335672	 point : [0.98695326]
Coeff 10 : 1	 point : [1]
Coeff 11 : 1	 point : [0]


methode : IM_GAUSS1D(20)
Nb points on convex 11
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.027834284	 point : [0.010885671]
Coeff 1 : 0.062790185	 point : [0.0564687]
Coeff 2 : 0.093145105	 point : [0.134924]
Coeff 3 : 0.11659688	 point : [0.24045194]
Coeff 4 : 0.13140227	 point : [0.36522842]
Coeff 5 : 0.13646254	 point : [0.5]
Coeff 6 : 0.13140227	 point : [0.63477158]
Coeff 7 : 0.11659688	 point : [0.75954806]
Coeff 8 : 0.093145105	 point : [0.865076]
Coeff 9 : 0.062790185	 point : [0.9435313]
Coeff 10 : 0.027834284	 point : [0.98911433]
Coeff 11 : 1	 point : [1]
Coeff 12 : 1	 point : [0]


methode : IM_GAUSS1D(22)
Nb points on convex 12
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.023587668	 point : [0.0092196829]
Coeff 1 : 0.053469663	 point : [0.047941372]
Coeff 2 : 0.080039164	 point : [0.11504866]
Coeff 3 : 0.10158371	 point : [0.20634102]
Coeff 4 : 0.11674627	 point : [0.31608425]
Coeff 5 : 0.12457352	 point : [0.4373833]
Coeff 6 : 0.12457352	 point : [0.5626167]
Coeff 7 : 0.11674627	 point : [0.68391575]
Coeff 8 : 0.10158371	 point : [0.79365898]
Coeff 9 : 0.080039164	 point : [0.88495134]
Coeff 10 : 0.053469663	 point : [0.95205863]
Coeff 11 : 0.023587668	 point : [0.99078032]
Coeff 12 : 1	 point : [1]
Coeff 13 : 1	 point : [0]


methode : IM_GAUSS1D(24)
Nb points on convex 13
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.020242002	 point : [0.0079084726]
Coeff 1 : 0.04606075	 point : [0.0412008]
Coeff 2 : 0.069436755	 point : [0.099210955]
Coeff 3 : 0.08907299	 point : [0.17882533]
Coeff 4 : 0.10390802	 point : [0.27575362]
Coeff 5 : 0.11314159	 point : [0.38477084]
Coeff 6 : 0.11627578	 point : [0.5]
Coeff 7 : 0.11314159	 point : [0.61522916]
Coeff 8 : 0.10390802	 point : [0.72424638]
Coeff 9 : 0.08907299	 point : [0.82117467]
Coeff 10 : 0.069436755	 point : [0.90078905]
Coeff 11 : 0.04606075	 point : [0.9587992]
Coeff 12 : 0.020242002	 point : [0.99209153]
Coeff 13 : 1	 point : [1]
Coeff 14 : 1	 point : [0]


methode : IM_GAUSS1D(26)
Nb points on convex 14
Nb points on face 0 : 1
Nb points on face 1 : 1
Coeff 0 : 0.01755973	 point : [0.0068580957]
Coeff 1 : 0.040079044	 point : [0.035782558]
Coeff 2 : 0.060759285	 point : [0.086399342]
Coeff 3 : 0.078601584	 point : [0.15635355]
Coeff 4 : 0.092769199	 point : [0.24237568]
Coeff 5 : 0.10259923	 point : [0.34044382]
Coeff 6 : 0.10763193	 point : [0.44597253]
Coeff 7 : 0.10763193	 point : [0.55402747]
Coeff 8 : 0.10259923	 point : [0.65955618]
Coeff 9 : 0.092769199	 point : [0.75762432]
Coeff 10 : 0.078601584	 point : [0.84364645]
Coeff 11 : 0.060759285	 point : [0.91360066]
Coeff 12 : 0.040079044	 point : [0.96421744]
Coeff 13 : 0.01755973	 point : [0.9931419]
Coeff 14 : 1	 point : [1]
Coeff 15 : 1	 point : [0]


AddressSanitizer:DEADLYSIGNAL
=================================================================
==20800==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00019ae501b4 bp 0x00016f2ede80 sp 0x00016f2edd30 T0)
==20800==The signal is caused by a READ memory access.
==20800==Hint: address points to the zero page.
    #0 0x19ae501b4 in DGETRF+0x2c (libLAPACK.dylib:arm64e+0x11b4)
    #1 0x1056e005c in gmm::lu_factor(gmm::dense_matrix<double>&, std::__1::vector<int, std::__1::allocator<int>>&) gmm_lapack_interface.h:113
    #2 0x1056bfa0c in double gmm::lu_det<double>(gmm::dense_matrix<double> const&) gmm_opt.h:65
    #3 0x105f07980 in getfem::quasi_polar_integration::quasi_polar_integration(std::__1::shared_ptr<getfem::approx_integration const>, unsigned long, unsigned long) getfem_integration.cc:987
    #4 0x105f04a7c in void std::__1::allocator<getfem::quasi_polar_integration>::construct[abi:ne180100]<getfem::quasi_polar_integration, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&>(getfem::quasi_polar_integration*, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&) allocator.h:173
    #5 0x105f041c4 in std::__1::__shared_ptr_emplace<getfem::quasi_polar_integration, std::__1::allocator<getfem::quasi_polar_integration>>::__shared_ptr_emplace[abi:ne180100]<std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&, std::__1::allocator<getfem::quasi_polar_integration>, 0>(std::__1::allocator<getfem::quasi_polar_integration>, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&) shared_ptr.h:265
    #6 0x105f0393c in std::__1::shared_ptr<getfem::quasi_polar_integration> std::__1::allocate_shared[abi:ne180100]<getfem::quasi_polar_integration, std::__1::allocator<getfem::quasi_polar_integration>, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&, void>(std::__1::allocator<getfem::quasi_polar_integration> const&, std::__1::shared_ptr<getfem::approx_integration const> const&, int&, int&) shared_ptr.h:823
    #7 0x105eedd4c in getfem::quasi_polar(std::__1::deque<dal::naming_system<getfem::integration_method>::parameter, std::__1::allocator<dal::naming_system<getfem::integration_method>::parameter>>&, std::__1::vector<std::__1::shared_ptr<dal::static_stored_object const>, std::__1::allocator<std::__1::shared_ptr<dal::static_stored_object const>>>&) getfem_integration.cc:1067
    #8 0x105f1ac48 in dal::naming_system<getfem::integration_method>::method_(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned long&, bool) dal_naming_system.h:296
    #9 0x105eca264 in dal::naming_system<getfem::integration_method>::method(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned long&, bool) dal_naming_system.h:120
    #10 0x105ec278c in getfem::int_method_descriptor(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool) getfem_integration.cc:1141
    #11 0x100b13534 in main integration.cc:467
    #12 0x18cc80270  (<unknown module>)

==20800==Register values:
 x[0] = 0x000000016f2ee070   x[1] = 0x0000000000000000   x[2] = 0x0000607000009be0   x[3] = 0x000000702de7daf4  
 x[4] = 0x000000702de7db40   x[5] = 0x0000000000000001   x[6] = 0x0000000000000003   x[7] = 0x0000000000000001  
 x[8] = 0x0000000000000000   x[9] = 0x0000607000009be0  x[10] = 0x000000016f2edc60  x[11] = 0x0000000000000000  
x[12] = 0x0000000000000001  x[13] = 0x0000000000000001  x[14] = 0x0000000000000001  x[15] = 0x0000000000000000  
x[16] = 0x000000019ae50188  x[17] = 0x000000010141c5e0  x[18] = 0x0000000000000000  x[19] = 0x000000016f2edf20  
x[20] = 0x0000007000020000  x[21] = 0x0000000000000001  x[22] = 0x000000002de5dbe2  x[23] = 0x000000016f2edee0  
x[24] = 0x000000016f2edef0  x[25] = 0x000000016f2edf10  x[26] = 0x000000000004ff70  x[27] = 0x000000016f2edec0  
x[28] = 0x000000702de7dbd8     fp = 0x000000016f2ede80     lr = 0x00000001056e0060     sp = 0x000000016f2edd30  
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (libLAPACK.dylib:arm64e+0x11b4) in DGETRF+0x2c
==20800==ABORTING
zsh: abort      ./integration

Thanks, it is fine and useful information. The crash is in a lapack function call. I will let you know as soon as I have something for you to test.

Hi Konstantinos. For your information, I finally succeeded in installing GetFEM, by downloading the current development version!

Here is the good configure script, working on my Apple Silicon machine:

./configure CXX=g++-13 CC='gcc-13 -arch arm64 -ld_classic' CXXFLAGS='-arch arm64 
-ld_classic -no-pie -I/opt/homebrew/Cellar/qhull/2020.2/include' FC='gfortran-13 -arch arm64 
-ld_classic' CXXCPP='g++-13 -E -arch arm64 -ld_classic' CPP='g++-13 -E -arch arm64 
-ld_classic'  --enable-metis --enable-python --enable-matlab=no --enable-shared 
--disable-dependency-tracking --prefix=/opt/homebrew/ --enable-superlu 
LDFLAGS='-L/opt/homebrew/Cellar/superlu/7.0.0/lib -L/opt/homebrew/Cellar/qhull/2020.2/lib' 
--with-superlu-include-dir=/opt/homebrew/Cellar/superlu/7.0.0/include 

So, in the end, it worked also with gcc-13 and not necessarily clang (I didn’t even have to set gcc-13 and g++-13 as default compilers), and so I believe the problem was not really a compatibility issue with clang, but rather something that didn’t work well with version 5.4.2.

Thanks for the update. Great that you got it running. I am still working on improving clang compatibility.

Which blas did you use? I normally recommend openblas which provides both blas and lapack functions.

I didn’t have to install BLAS and LAPACK, as they already ship with macOS in general.

ok, but it is still important to know which kind of blas/lapack the configure script has detected because the performance of the software depends a lot on linking with a fast blas/lapack library. If it does not find any, then it uses some slow replacement.

The output of the configure script concerning BLAS is the following:

BLAS_LIBS=
checking for sgemm_... no
checking for sgemm_ in -lblas... yes
OK, You have working BLAS libs ! Using -lblas
BLAS found to have the Intel fortran ABI, i.e. returning complex function value by argument

and at the end

- Lapack library found: -llapack
- BLAS library found. Link options: -lblas
  You can give the location of your prefered blas library with either
  the --with-blas=<lib> option, or the BLAS_LIBS environment variable
  for example: ./configure BLAS_LIBS="-L/usr/lib/sse2/atlas/ -lblas"
  Use blas with 32 bits integers

I don’t know if it’s enough to infer the version of BLAS and LAPACK, but they both seem to be part of a so-called “Accelerate” framework on Apple computers (see here: BLAS | Apple Developer Documentation).

I see. It looks good :+1:

By the way, is it normal to get many warnings when running python demo_tripod.py?
The general warning I get is

Level 2 Warning in ../../src/gmm/gmm_precond_ilu.h, line 182: pivot 1 is too small

and it is repeated more than 400 times. Then it mentions

Level 2 Warning in ../../src/getfem/getfem_model_solvers.h, line 108: gmres did not converge!
Singular tangent matrix: perturbation failed, aborting.

this is the output of demo_tripod.py on my build


** Could NOT import getfem_tvtk -- graphical output disabled **

done!
nbcvs=2799, nbpts=5621, qdim=3, fem = FEM_PK(3,2), nbdof=16764
test [-10.      -10.       -9.99999 ...  -4.54596  -7.27148  -5.9042 ]
running solve...
Trace 2 in getfem_models.cc, line 4399: Mass term assembly for Dirichlet condition
Trace 2 in getfem_models.cc, line 3308: Generic source term assembly
Trace 2 in getfem_models.cc, line 3319: Source term: generic source term assembly
Trace 2 in getfem_models.cc, line 4399: Mass term assembly for Dirichlet condition
Trace 2 in getfem_models.cc, line 2652: Global generic assembly RHS
 iter   0 residual            1
Trace 2 in getfem_models.cc, line 2654: Global generic assembly tangent term
Trace 2 in getfem_models.cc, line 2652: Global generic assembly RHS
Trace 2 in getfem_models.cc, line 2652: Global generic assembly RHS
Trace 2 in getfem_models.cc, line 2652: Global generic assembly RHS
Trace 2 in getfem_models.cc, line 2652: Global generic assembly RHS
step control [       0,       1,     0.125] iter   1 residual      1.33557
solve done!
Von Mises range:  0.39011853000070584 68.77907458481509
*** GetFEM view of the workspace:
message from gf_workspace follow:
Workspace 0 [main -- 13 objects]
 ID   0               gfMesh          
 ID   1            gfMeshFem           depends on  ID0
 ID   2            gfMeshFem           depends on  ID0
 ID   3            gfMeshFem           depends on  ID0
 ID   4              gfInteg          
 ID   5             gfMeshIm           depends on  ID0
 ID   6                gfFem          
 ID   7                gfFem          
 ID   8                gfFem          
 ID   9              gfModel           depends on  ID1 ID5
 ID  10            gfMeshFem           depends on  ID0
 ID  11                gfFem          
 ID  12              gfSlice           depends on  ID0


*** Python view of the workspace:
<class 'getfem.Mesh'> class 8, id 0 : instances=1
<class 'getfem.MeshFem'> class 9, id 1 : instances=1
<class 'getfem.MeshFem'> class 9, id 2 : instances=1
<class 'getfem.MeshFem'> class 9, id 3 : instances=1
<class 'getfem.MeshIm'> class 10, id 5 : instances=1
<class 'getfem.Model'> class 14, id 9 : instances=1
<class 'getfem.MeshFem'> class 9, id 10 : instances=1
<class 'getfem.Slice'> class 16, id 12 : instances=1
You can view the tripod with (for example) mayavi:
mayavi2 -d tripod.vtk -f WarpVector -m Surface
or
gmsh tripod.pos

I forgot the last lines, actually:

Level 2 Warning in ../../src/getfem/getfem_model_solvers.h, line 108: gmres did not converge!
Singular tangent matrix: perturbation failed, aborting.
solve done!
Von Mises range:  4.762201526816372e-48 5.522396422172957e-45
*** GetFEM view of the workspace:
message from gf_workspace follow:
Workspace 0 [main -- 13 objects]
 ID   0               gfMesh          
 ID   1            gfMeshFem           depends on  ID0
 ID   2            gfMeshFem           depends on  ID0
 ID   3            gfMeshFem           depends on  ID0
 ID   4              gfInteg          
 ID   5             gfMeshIm           depends on  ID0
 ID   6                gfFem          
 ID   7                gfFem          
 ID   8                gfFem          
 ID   9              gfModel           depends on  ID1 ID5
 ID  10            gfMeshFem           depends on  ID0
 ID  11                gfFem          
 ID  12              gfSlice           depends on  ID0


*** Python view of the workspace:
<class 'getfem.getfem.Mesh'> class 8, id 0 : instances=1
<class 'getfem.getfem.MeshFem'> class 9, id 1 : instances=1
<class 'getfem.getfem.MeshFem'> class 9, id 2 : instances=1
<class 'getfem.getfem.MeshFem'> class 9, id 3 : instances=1
<class 'getfem.getfem.MeshIm'> class 10, id 5 : instances=1
<class 'getfem.getfem.Model'> class 14, id 9 : instances=1
<class 'getfem.getfem.MeshFem'> class 9, id 10 : instances=1
<class 'getfem.getfem.Slice'> class 16, id 12 : instances=1
You can view the tripod with (for example) mayavi:
mayavi2 -d tripod.vtk -f WarpVector -m Surface
or
gmsh tripod.pos
Traceback (most recent call last):
  File "/Users/francescobonaldi/getfem-HEAD/interface/tests/python/demo_tripod.py", line 146, in <module>
    fig.show(mfu, deformation=U, data=(mfdu,VM), deformation_scale='20%')
  File "/Users/francescobonaldi/getfem-HEAD/interface/tests/python/getfem_tvtk.py", line 452, in show
    self.show_mesh_fem(mf, **args)
  File "/Users/francescobonaldi/getfem-HEAD/interface/tests/python/getfem_tvtk.py", line 410, in show_mesh_fem
    self.actors += it.vtk_actors()
                   ^^^^^^^^^^^^^^^
  File "/Users/francescobonaldi/getfem-HEAD/interface/tests/python/getfem_tvtk.py", line 299, in vtk_actors
    self.mapper = tvtk.PolyDataMapper(input=data);
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "tvtk_classes/poly_data_mapper.py", line 47, in __init__
  File "/opt/homebrew/lib/python3.11/site-packages/tvtk/tvtk_base.py", line 427, in __init__
    super(TVTKBase, self).__init__(**traits)
  File "/opt/homebrew/lib/python3.11/site-packages/traits/trait_type.py", line 90, in _read_only
    raise TraitError(
traits.trait_errors.TraitError: The 'input' trait of a PolyDataMapper instance is 'read only'.

I also tried to link OpenBLAS (installed with Homebrew) instead of MacOS default BLAS, but the outcome is the same. I can visualize tripod.pos in Gmsh, but of course, as you can see, the von Mises stress is null everywhere…

On the other hand, python demo_tripod_alt.py works well. Might it depend on the fact that I am using SuperLU and you are using MUMPS, perhaps?

FYI, the very same behavior occurs on running the same Python script, demo_tripod.py, on a remote HPC server (Linux-based, of course), where GetFEM 5.4.2 was installed (about one year ago), so perhaps it’s not related to the underlying architecture, nor to the employed solver. It would be interesting to investigate what is wrong with the resolution of the linear system in the case of this specific script.

I figured it out. By default, it seems that GetFEM uses GMRES with an incomplete LU factorization as a preconditioner. Upon changing line 111 of the script to

md.solve('noisy', 'lsolver', 'superlu', 'max iter', 1);

(thereby, adding ‘lsolver’ and ‘superlu’), this fixes the problem.

Maybe this behavior is related to the fact that, in the absence of MUMPS, the default solver is ILU-GMRES.

By the way, even though I succeeded in installing MUMPS 5.3.5 on my Mac system, there are still some incompatibilities of this library with Mac, since the repo is not maintained any longer.

Unfortunately, some of the demo scripts that rely on MUMPS, such as demo_finite_strain_plasticity_3D.py, do not work well by just replacing ‘mumps’ by ‘superlu’.