Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2016-04-08 14:34:59

koala
Member
Registered: 2016-04-08
Posts: 9

[SOLVED/RESOLU] Mfront: seg fault

Hi all,
We are testing MFront with Aster and we encounter a segfault very early in the process.

The test is a simple tensile test with HEXA20. It runs fine when using RELATION VMIS_ISOT_TRAC with COMPORTEMENT  PETIT or SIMO_MIEHE.

Environment:
- Debian cluster, x64.
- Aster 12.4
- MFront 2.0.2 from V12.4
- Testing done directly on the frontend, no queuing system interaction using the sequential version.
- The test is started from astk in interactive mode.

Process:
- Use the Elastic.mfront file from Aster's distribution, move it to a directory of choice,
- export mfront path
- compile the library
- check symbols with nm -D libAsterBehaviour.so
- run mtest
- adjust the comm file to declare the material and adjust COMPORTEMENT
So far so good...

Now we are using STAT_NON_LINE for this simple elastic model, granted it is not neccessary,  but that should not be problem, should it?

Run the test and we get a segfault, see error below and the complete mess file in attachment.  Not sure why it is looking for strlen in some obscure path,  we certainly do not have this on the system. Any thoughts?

EDIT: By the way, inserting a random name in NOM_ROUTINE still produce the segfault, as if the error occurs before (or during) a check for existing NOM_ROUTINE in the library (assuming there is such check).

Regards
Guillaume

RESU = STAT_NON_LINE(CHAM_MATER=CHMAT,
                       METHODE='NEWTON',
                       MODELE=MOD,
                       INFO=1,
                       EXCIT=(_F(CHARGE=BLOCK,
                                 TYPE_CHARGE='FIXE_CSTE',),
                              _F(CHARGE=DISP,
                                 FONC_MULT=FDISP,
                                 TYPE_CHARGE='FIXE_CSTE',),
                              ),
                       INCREMENT=_F(LIST_INST=INSTANTS,
                                    PRECISION=1.E-06,),
                       CONVERGENCE=_F(RESI_GLOB_RELA=1.E-07,
                                      ITER_GLOB_MAXI=20,
                                      ARRET='OUI',
                                      ITER_GLOB_ELAS=25,),
                       COMPORTEMENT=_F(DEFORMATION='PETIT',
                                       RELATION='MFRONT',
                                       RESI_INTE_MAXI=1.E-08,
                                       ITER_INTE_MAXI=100,
                                       ITER_INTE_PAS=0,
                                       NOM_ROUTINE='asterelasticity',
                                       LIBRAIRIE='libAsterBehaviour.so',
                                       RESI_CPLAN_RELA=1.E-06,
                                       PARM_THETA=1.0,
                                       ITER_CPLAN_MAXI=1,
                                       PARM_ALPHA=1.0,),
                       SOLVEUR=_F(SYME='OUI',
                                  METHODE='MUMPS',
                                  STOP_SINGULIER='OUI',
                                  ELIM_LAGR='LAGR2',
                                  TYPE_RESOL='AUTO',
                                  MATR_DISTRIBUEE='NON',
                                  GESTION_MEMOIRE='AUTO',
                                  FILTRAGE_MATRICE=-1.0,
                                  RENUM='AUTO',
                                  NPREC=8,
                                  PCENT_PIVOT=20,
                                  RESI_RELA=-1.0,
                                  PRETRAITEMENTS='AUTO',
                                  POSTTRAITEMENTS='AUTO',
                                  MIXER_PRECISION='NON',),
                       NEWTON=_F(REAC_INCR=1,
                                 PREDICTION='ELASTIQUE',
                                 REAC_ITER=1,
                                 MATRICE='TANGENTE',
                                 REAC_ITER_ELAS=0,),
                       ARCHIVAGE=_F(PRECISION=1.E-06,
                                    CRITERE='RELATIF',),
                       )

sh: line 1: 15959 Segmentation fault      (core dumped) /software/CA12.4/12.4/bin/aster /software/CA12.4/12.4/lib/aster/Execution/E_SUPERV.py -commandes fort.1 -num_job 15831-eukles -mode interactif -rep_outils /software/CA12.4/outils -rep_mat /software/CA12.4/12.4/share/aster/materiau -rep_dex /software/CA12.4/12.4/share/aster/datg -suivi_batch -memjeveux 406.25 -tpmax 54000
EXECUTION_CODE_ASTER_EXIT_15831-eukles=139
<INFO> Code_Aster run ended, diagnostic : <F>_ABNORMAL_ABORT

<E>_CORE_FILE      Code_Aster run created a coredump

<INFO> core file name : core

--------------------------------------------------------------------------------
 Coredump analysis

coredump analysis...                                                    [  OK  ]
[New LWP 15959]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/software/CA12.4/12.4/bin/aster /software/CA12.4/12.4/lib/aster/Execution/E_SUP'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
106     ../sysdeps/x86_64/strlen.S: No such file or directory.
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x000000000049d304 in CopyCStrToFStr ()
#2  0x000000000049eb21 in error_symbol_not_found ()
#3  0x000000000049f0e3 in mfront_get_nbvari_ ()
#4  0x0000000000f6128f in comp_meca_read_ ()
#5  0x00000000011161f1 in nmdocc_ ()
#6  0x0000000001120dbf in nmdorc_ ()
#7  0x000000000110fb1b in nmdata_ ()
#8  0x00000000011f89d7 in op0070_ ()
#9  0x00000000014ef640 in execop_ ()
#10 0x00000000014ef7d2 in expass_ ()
#11 0x00000000004995f6 in aster_oper ()
#12 0x00007faab0dd5e6c in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#13 0x00007faab0dd627d in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#14 0x00007faab0dd627d in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#15 0x00007faab0dd627d in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#16 0x00007faab0e49190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#17 0x00007faab0d9840d in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#18 0x00007faab0da0be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#19 0x00007faab0de30e5 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#20 0x00007faab0da0be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#21 0x00007faab0de3966 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#22 0x00007faab0da0be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#23 0x00007faab0dd4442 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#24 0x00007faab0e49190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#25 0x00007faab0dd0639 in PyEval_EvalCode () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#26 0x00007faab0dd645b in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#27 0x00007faab0e49190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#28 0x00007faab0dd6171 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#29 0x00007faab0e49190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#30 0x00007faab0d9840d in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#31 0x00007faab0da0be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#32 0x00007faab0dd3907 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#33 0x00007faab0e49190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#34 0x00007faab0d9840d in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#35 0x00007faab0da0be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#36 0x00007faab0dd3907 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#37 0x00007faab0e49190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#38 0x00007faab0dd6171 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#39 0x00007faab0e49190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#40 0x00007faab0dd6171 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#41 0x00007faab0dd627d in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#42 0x00007faab0e49190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#43 0x00007faab0dd0639 in PyEval_EvalCode () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#44 0x00007faab0df38da in PyRun_FileExFlags () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#45 0x00007faab0df3a47 in PyRun_SimpleFileExFlags () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#46 0x00007faab0d546fa in Py_Main () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#47 0x00007faaaff83b45 in __libc_start_main (main=0x492620 <main>, argc=19, argv=0x7ffea89cb488, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffea89cb478) at libc-start.c:287
#48 0x00000000004926fe in _start ()

Last edited by koala (2016-04-09 00:11:16)

Offline

#2 2016-04-08 14:39:05

koala
Member
Registered: 2016-04-08
Posts: 9

Re: [SOLVED/RESOLU] Mfront: seg fault

Damn preview :-), here is the mess file


Attachments:
forum.mess, Size: 36.92 KiB, Downloads: 45

Offline

#3 2016-04-08 20:24:15

mathieu.courtois
Administrator
From: France
Registered: 2007-11-21
Posts: 1,112

Re: [SOLVED/RESOLU] Mfront: seg fault

Hello,

This problem has already been solved in the default branch.
It should have been backported into the v12 branch but we didn't!

If you are interesting by the patch :
https://bitbucket.org/code_aster/codeas … c8fc71a0db

This will be solved in the next 12.6 release.

MC


Code_Aster release : last unstable on Ubuntu 16.04 64 bits - GNU Compilers

Please do not forget to tag your first post as *SOLVED* when it is!

Offline

#4 2016-04-09 00:10:35

koala
Member
Registered: 2016-04-08
Posts: 9

Re: [SOLVED/RESOLU] Mfront: seg fault

Thanks Mathieu,

This solved the issue. I also had a typo in the path to the mfront file specified in astk under 'nom'.

I faced another problem. MFront was complaining that it could not save the tangent matrix. Changing the flag from true to false in Elasticity.mfront solved the problem as well. 

@AsterSaveTangentOperator[aster] false

Offline

#5 2017-01-09 22:34:16

GFA
Member
From: Reus Spain
Registered: 2013-02-22
Posts: 6

Re: [SOLVED/RESOLU] Mfront: seg fault

Hi!

I am trying to embed a mfront model in code aster. I work in salome mecca 2016. I have exactly the same error:
EXECUTION_CODE_ASTER_EXIT_0051-2776-gerard-HP-rp5800 = 139
<I> _EXIT_CODE = 139
or
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!
   ! <S> Exception utilisateur levee plus pas interceptee. !
   ! Les bases sont fermees. !
   ! Type de l'exception: error!
   ! !
   ! The MFRONT bibliothèque n'a pas pu être chargée. !
   ! !
   ! Nom de la bibliothèque: ./libAsterBehaviour.so!
   ! !
   ! Conseil: Vérifiez l'environnement est correctement défini,!
   ! Notamment the variable LD_LIBRARY_PATH. !
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!
Depending on the path you put in LIBRAIRIE = ''
Does anyone know what mistake I am making?
Thanks

Gerard


Gerard Fortuny
Universitat Rovira i Virgili
Spain

Offline

#6 2017-01-11 16:22:39

thomas.helfer
Member
Registered: 2013-09-26
Posts: 57

Re: [SOLVED/RESOLU] Mfront: seg fault

Dear Gérard,

A tested your file successfully. There were several issues.

The Code-Aster developpers have integrated officially some behaviours to replace some of their natives behavours, but they keep the default output libAsterBehaviours.so. So there is a conflict with your library if you don't specify explicitely the full path of your library (we seems to be the standard pratice among Code_Aster users. I don't recommend doing this and prefer using the LD_LIBRARY_PATH variable). A ticket has been open to change the name of the library used by Code_Aster internally.

The other issues are not related MFront:

1) You did not define the ALPHA parameter
2) You give 3 material properties in the definition of the MFront behaviour: only 2 are expected.

Once done, your computation seems to work (convergence in one iteration, which is expected for an elastic behaviour).

Regards,

Helfer Thomas

Offline

Board footer