How to use Aster "the old-school way"

Hello everyone,

Is it still possible to launch a study with the old-fashion way :

/opt/aster/bin/as_run --run mon_etude.export

?

It was very useful and efficient to run multiple studies and, moreover, link them with other internal or professionnal tools I have on my computer.

I’ve just downloaded the “Scibian10 Singularity container” and the last sif with Salome_Meca. Thank you : it works ! I have a graphical interface, with all the tools (Geometry, Mesh, etc.). But I do not figure out how to write and launch my own script, in a bash-style.

I wanted to download Aster without Salome, but I havnt found Aster alone :frowning: I’ve tried to read :

**I would be soooo pleased to find a way to just write my scripts in text, and launch it without any graphical interface.

Can I ?**

Thank you for your help !

Pardon if the answer is already written somewhere.

A+

PS : I’m not a EDF worker - I usse Aster both for personnal et professionnal use

@SadriMével

Hello,

there you go:

There’s a shortcut too (only one command) but that I forgot. Your container may have a different filename,

Mario.

hello

this is the way i have proceeded for almost 16 years now on

and the way i keep proceeding to day with version 16.5 and 17

have a look at this post it explains how it is possible

https://forum.code-aster.org/public/d/27218-where-is-code-aster-website-going/8

jean pierre aubry

singularity run ~/salome_meca-lgpl-2021.0.0-0-20210601-scibian-9.sif shell << END

as_run Stage_0_PreProcess.export

as_run Stage_1_Assembly.export

as_run Stage_2_Load.export

as_run Stage_3_PostProcess.export

as_run Stage_4_Reactions.export

END

I added the following alias in my .bashrc:

alias aster=‘singularity run /home/path_to_Salome/salome_meca-lgpl-2022.1.0-1-20221225-scibian-9.sif shell – as_run --run’

And then I can launch a simulation from the command line with:

aster mon_etude.export

@mf It doesn’t work in WSL for me.

user@mypc:~/sm22> ls
salome_meca-lgpl-2022.1.0-1-20221225-scibian-9.sif
user@mypc:~/sm22> ./salome_meca-lgpl-2022.1.0-1-20221225-scibian-9 --shell
-bash: ./salome_meca-lgpl-2022.1.0-1-20221225-scibian-9: No such file or directory

@jeanpierreaubry I get this:

user@mypc:~/sm22> singularity run ./salome_meca-lgpl-2022.1.0-1-20221225-scibian-9.sif shell
*****************************************************
INFO : Running salome_meca in software rendering mode
*****************************************************

Then nothing happens. If I add << END, I cannot run the command (it waits for me to end the command line).

@Cherblanc This seems to work.

user@mypc:~/sm22> singularity run salome_meca-lgpl-2022.1.0-1-20221225-scibian-9.sif shell -- as_run --test forma01a
*****************************************************
INFO : Running salome_meca in software rendering mode
*****************************************************
<INFO> démarrage de forma01a

--------------------------------------------------------------------------------
 Exécution de Code_Aster

<INFO> préparation de l'environnement (...)

@lIlIl

the command you display is not what my post is about

not at all

read it more carefully

it needs some installation before running code_aster

which means installing a stand alone version of code_aster within a conda environment

main advantage:

-you have full access to what is installed

-you have only code_aster stand alone, no salome-meca, no asterstudy, no paravis

the old school as was asked for in the tile of the post by SadriMével

@lIlIl

Hello,

yes, repeating half of the commands probably does not work :slight_smile:

Mario.

I’m running WSL2 Debian 12 and Salome-Meca 2022 under Singularity 4.2.0. It works in terminal:

My reply went to show that short answers do not actually help beginners solve their problems. I share my own tests to save time for others.

@mf Since your first command contains install I did not run it since I had already downloaded the SIF (Singularity Image File) when following the tutorial by Hassan Berro.

I tried to run your first command just now: nothing else was installed, a Python file was created in the folder (salome_meca-lgpl-2022.1.0-1-20221225-scibian-9) and now the second line worked. I looked up “–app install” in the documentation, but it does not explain what it does in details. singularity run -h explains that:

--app string             set an application to run inside a container

I do not understand what it means. No mention of “–app install”.

@k_zurawski I managed to do what you did in the PowerShell. When I tried:

singularity run ./salome_meca-lgpl-2022.1.0-1-20221225-scibian-9.sif shell

again today in the Windows terminal, it worked! So @jeanpierreaubry’s command also works (without the << END). The conda environment approach is interesting.

My problem now is that many of the tests don’t work (forma01a, forma01b, forma02a, adlv100d):

 ╔════════════════════════════════════════════════════════════════════════════════════════════════╗
 ║ <F> <JEVEUX1_71>                                                                               ║
 ║                                                                                                ║
 ║ La mémoire totale de 256.00 Mo allouée à l'étude est insuffisante, il est nécessaire           ║
 ║  de disposer d'au moins 688.39 Mo uniquement pour démarrer l'exécution.                        ║
 ║                                                                                                ║
 ║                                                                                                ║
 ║ Cette erreur est fatale. Le code s'arrête.                                                     ║
 ╚════════════════════════════════════════════════════════════════════════════════════════════════╝

@lIlIl change amount of memory in export file to something bigger than required.

This solved the problem (as described in the error message). I mentioned it because I was surprised a test would fail in the official container. Dose the required amount of memory change depending on the hardware?..

@lIlIl I also found this part very odd in code_aster, a default small RAM & run time, dunno why…

I set in .export file:

P memory_limit 56640.625 ## Mb, 90% of my PC RAM

P time_limit 400000.0 ## in seconds, odd unit

With those 2 it always seems to work. Is there a config file somewhere to set these by default for all runs?

Mega octets, not megabytes, and memory limit is max possible to use not assigned to a job. mem jeveux is.

@k_zurawski I don’t quite understand, but look interesting, what do you exactly mean?

When I use the values I posted, code_aster writes in the .export file these:

`
P memjob 58000000

P memory_limit 56640.625

P time_limit 400000.0

P tpsjob 6667

A memjeveux 7080.078125

A tpmax 400000.0
`

What’s the difference vs what you suggest?

memjeveux controls the amount of memory (RAM) allocated to the Jeveux memory manager, which is used internally by Code_Aster for managing temporary data structures and computation buffers.

memory_limit is upper limit for the total memory that can be used by the analysis, including Jeveux memory and other memory used by the solver, libraries, and linked modules.

In my opinion, and this is only opinion not based on facts, the same testcase created years ago for standalone Code_Aster might require less memory than run in the latest Salome_Meca in container.

@jeanpierreaubry

Bonjour Jean-Pierre

Je ne trouve pas de version 16 : https://code-aster.org/spip.php?article272

J’en étais resté à la V13 sous Ubuntu 18.04 mais soudain ASTK ne répond plus à la commande LANCE.

Sur un nouvel ordi je dois installer Ubuntu 24.04 LTS mais comment savoir si la version 16 y sera compilable ?

Cordialement

@J_Berthellemy

bonjour Jacques

vous pouvez me contacter à mon mail (dans la signature)

comment je procède maintenant est expliqué plus haut dans ce fil

La version d’aster est diffusée en container salome_meca désormais, il n’y a plus de paquet “aster-full” compilable.