thelfer / MFrontGenericInterfaceSupport

This project aims at providing support for MFront generic behaviours. This project can be embedded in open-source and propriary sofware
36 stars 35 forks source link

tests/IntegrateTest segfaults. #3

Closed endJunction closed 5 years ago

endJunction commented 5 years ago

Hi, I was trying to execute the tests from the current master (9b67ad18), but for all of the IntegrateTest* I get a SEGV.

tfel version 3.2.0, which I got from the sourceforge site, gcc-8.2.1 on ArchLinux. steps to reproduce:

git clone https://github.com/thelfer/MFrontGenericInterfaceSupport.git
mkdir build
cd build
cmake ../MFrontGenericInterfaceSupport -DCMAKE_BUILD_TYPE=Debug -Denable-fortran-bindings=OFF
make check

cmake runs fine, but complains about tfel's unknown option --python-version, saying afterwards that there are no tfel python bindings. make check compiles w/o interesting warnings, finally outputting:

Cannot find file: /tmp/build/DartConfiguration.tcl
   Site: 
   Build name: (empty)
Create new tag: 20190202-1447 - Experimental
Cannot find file: /tmp/build/DartConfiguration.tcl
Test project /tmp/build
    Start 1: MFrontGenericBehaviourInterfaceTest
1/9 Test #1: MFrontGenericBehaviourInterfaceTest ....   Passed    0.01 sec
    Start 2: MFrontGenericBehaviourInterfaceTest2
2/9 Test #2: MFrontGenericBehaviourInterfaceTest2 ...   Passed    0.01 sec
    Start 3: BoundsCheckTest
3/9 Test #3: BoundsCheckTest ........................   Passed    0.00 sec
    Start 4: ParameterTest
4/9 Test #4: ParameterTest ..........................   Passed    0.01 sec
    Start 5: IntegrateTest
5/9 Test #5: IntegrateTest ..........................***Exception: SegFault  0.26 sec
    Start 6: IntegrateTest2
6/9 Test #6: IntegrateTest2 .........................***Exception: SegFault  0.31 sec
    Start 7: IntegrateTest2b
7/9 Test #7: IntegrateTest2b ........................***Exception: SegFault  0.29 sec
    Start 8: IntegrateTest3
8/9 Test #8: IntegrateTest3 .........................***Exception: SegFault  0.32 sec
    Start 9: IntegrateTest3b
9/9 Test #9: IntegrateTest3b ........................***Exception: SegFault  0.33 sec

44% tests passed, 5 tests failed out of 9

Total Test time (real) =   1.54 sec

The following tests FAILED:
          5 - IntegrateTest (SEGFAULT)
          6 - IntegrateTest2 (SEGFAULT)
          7 - IntegrateTest2b (SEGFAULT)
          8 - IntegrateTest3 (SEGFAULT)
          9 - IntegrateTest3b (SEGFAULT)
Errors while running CTest

Running tests/IntegrateTest tests/libBehaviourTest.so in gdb yields following backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff79aa223 in tfel::material::NortonIntegrationData<(tfel::material::ModellingHypothesis::Hypothesis)6, double, false>::NortonIntegrationData (mgb_d=..., this=0x7fffffffce28) at /usr/include/TFEL/Math/General/fsarray.ixx:89
89          fsarray<N,T>::fsarray() noexcept
(gdb) bt
#0  0x00007ffff79aa223 in tfel::material::NortonIntegrationData<(tfel::material::ModellingHypothesis::Hypothesis)6, double, false>::NortonIntegrationData (mgb_d=..., this=0x7fffffffce28) at /usr/include/TFEL/Math/General/fsarray.ixx:89
#1  tfel::material::Norton<(tfel::material::ModellingHypothesis::Hypothesis)6, double, false>::Norton (mgb_d=..., this=0x7fffffffcd80) at /tmp/build/tests/include/TFEL/Material/Norton.hxx:476
#2  mfront::gb::integrate<tfel::material::Norton<(tfel::material::ModellingHypothesis::Hypothesis)6, double, false> > (d=..., f=tfel::material::TangentOperatorTraits<(tfel::material::MechanicalBehaviourBase::BehaviourType)1>::STANDARDTANGENTOPERATOR, p=tfel::material::None) at /usr/include/MFront/GenericBehaviour/Integrate.hxx:99
#3  0x000055555555645a in mgis::behaviour::integrate (b=..., d=...) at /tmp/MFrontGenericInterfaceSupport/include/MGIS/Behaviour/Integrate.ixx:24
#4  main (argc=<optimized out>, argv=<optimized out>) at /tmp/MFrontGenericInterfaceSupport/tests/IntegrateTest.cxx:48

Don't hesitate to ask for more output or testing -- maybe it's machine/OS specific.

thelfer commented 5 years ago

Hi @endJunction,

Thank you for your interest in MGIS and your feed-back.

MGIS is a very young project, so it is not surprising that you face such issues when mixing versions/branches of TFEL and MGIS.

If you look at the front page of the project on github, you'll see:

  • the master branch follows the evolution of the master branch of the TFEL project
  • the rliv-1.0 follows the evolution of the 3.2.x series of the TFEL project. Note that this branch is not compatible with TFEL-3.2.0.

This is mostly du to the fact that I forgot to add support for stored and dissipated energies in the generic interface of MFront and that some of my early users urges me to correct that. As a consequence, the data structure passed the behaviour changed (two additional members), hence the segfault.

If you want to keep up with:

Note that the master branch is likely to evolve rapidly in the following week as we will start working on generalised and/or multiphysics behaviours in MFront.

As the project matures, things will stabilize, for the moment users will have to be a very cautious.

Do not hesitate if you have other feed-backs, features request, and so on.

Regards,

Thomas