How to read a message file of code_aster, especially when something goes wrong...

In code_aster, the .mess file, often referred to as the "message" file, contains detailed diagnostic information about the execution of your simulation. This file is essential for debugging and verifying that your model and calculations are correct.

Here’s a quick overview of what we typically do at Simvia when working with a .mess file, and some of the first tips we give to our less experienced colleagues.

What will you find in the .mess ?

First, a quick reminder: the .mess file can be generated in two ways

  • by including this line in your mystudy.export file:
F comm mystudy.comm D 1
F mmed mymesh.mmed  D 20
F mess mystudy.mess R  6
  • Or by using this command line in your terminal directly:

run_aster mystudy.export > mystudy.mess

This file includes many useful details (that we cherish at Simvia), such as :

  • Information about the input files ;
  • All code_aster commands executed during the simulation (from your .comm file) ;
  • Detailed information about the simulation process, including intermediate steps and calculations.

Note that some users at Simvia, or outside, prefer to name this file mystudy.log instead of mystudy.mess. It's really a matter of taste. Honestly, it looks quite like a typical .log file from other software, so feel free to rename it if it suits you better!

You will enjoy read this file when everything goes well !

At the end of a successful simulation, you should see something like this at the last three lines

------------------------------------------------------------
--- DIAGNOSTIC JOB : OK
------------------------------------------------------------

That’s your green light:you can check that your model was realistic, which is your prefered job as a simulation expert.

Now check the last ~50 lines of the .mess file to get important performance indicators, such as:

  • CPU times
************************************************************************
* COMMAND          :       USER :     SYSTEM :   USER+SYS :    ELAPSED *
************************************************************************
* DEBUT            :       0.04 :       0.41 :       0.45 :       0.54 *
* FIN              :       0.05 :       0.00 :       0.05 :       0.04 *
************************************************************************
* TOTAL_JOB        :       0.09 :       0.41 :       0.50 :       0.58 *
************************************************************************
  • Memory information
MEMOIRE JEVEUX MINIMALE REQUISE POUR L'EXECUTION :                     207.49 Mo
MEMOIRE JEVEUX OPTIMALE REQUISE POUR L'EXECUTION :                     212.26 Mo
MAXIMUM DE MEMOIRE UTILISEE PAR LE PROCESSUS LORS DE L'EXECUTION :     883.53 Mo

... but sometimes, it doesn't go so well !

If something went wrong, instead of DIAGNOSTIC JOB : OK, you might see:

------------------------------------------------------------
--- DIAGNOSTIC JOB : <A>_ALARM
------------------------------------------------------------

or worse:

------------------------------------------------------------
--- DIAGNOSTIC JOB : <F>_ERROR
------------------------------------------------------------

That means an issue occurred, and you need to investigate.

The simplest way to start is to search the .mess file for the strings <F> or <A> using your favorite IDE or text editor.

For example, in one of our recent cases, we found this:

╔══════════════════════════════════════════════════════════════════════╗
<F> <MFRONT_4>║ Le fichier de sortie de MFront n'a pas pu être produit.║  Conseil : Vérifiez l'existence du fichier fourni pour UNITE_MFRONT.║ Cette erreur est fatale. Le code s'arrête.╚══════════════════════════════════════════════════════════════════════╝

Well… we messed up our MFront configuration (sorry about that!).

What next ?

Great, you’ve found the error message. But what do you do now?

While code_aster "loves" to speak French, modern translation tools can help you understand most error messages. Still, some messages remain hard to interpret.

Luckily, many code_aster commands support the INFO keyword, which controls the level of detail printed in the .mess file:

  • INFO = 1 (default) for minimal output: only essential information
  • INFO = 2 for more verbose version, including additional intermediate output

At Simvia, we usually increase the INFO level iteratively when we don’t fully understand an error. Just be aware: INFO = 2 will significantly increase the size of your .mess file if you use it at every function.

For example, to know more about your mesh when you read it, add this at your .comm file:

MESH = LIRE_MAILLAGE(FORMAT="MED", INFO=2)

Still stuck (or have doubts) ?

  • Check (again 😏) the documentation: it’s extensive and often answers most questions
  • Search in the code_aster forum (https://forum.code-aster.org/public/) and if you don't find your answer, post
  • Already a Simvia technical support customer? Open an issue, we’re here to help
  • Not working with us yet but think this could be a good opportunity? Contact us at info@simvia.tech, that can change!

Conclusion

The .mess file in code_aster can become your best friend when trying to understand what’s going on under the hood of your simulation. We hope this article helps you start using it more effectively.

We’ll be sharing more tips here and on our YouTube channel related to this topic and others. It will be announced in our future newsletters, don't forget to subscribe to both !