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

You are not logged in.

#1 2019-10-03 12:58:04

DeuxPi360
Member
Registered: 2016-04-01
Posts: 8

[SOLVED] Number of threads used by code_aster

Hello Everyone

Does someone know how to change the number of threads used by a code_aster simulation run sent with as_run. I use a compiled version of code_aster 14.2. The 12.7 version used only 1 thread and it looks like it was better in performance when many simulations are sent in parallel. Here is a copy/paste of the htop of the process:

9h38:33 /opt/aster142/14.2/bin/aster /opt/aster142/14.2/lib/aster/Execution/E_SUPERV.py -commandes fort.1 --num_job=8814 --mode=interactif --rep_outils=/opt/aster142/outils --rep_mat=/opt/aster142/14.2/share/aster/materiau --rep_dex=/opt/aster142/14.2/share/aster/datg --numthreads=12 --suivi_batch --memjeveux=626.5 --tpmax=100000.0

I suspect the --numthreads to be half the available processors on the machine. Can it be changed? I tried entering
A numthreads 1
In the export file but it just added a parameter that had no effect on reducing the number of used threads.

Many thanks
Laurent

Last edited by DeuxPi360 (2019-10-08 17:44:59)

Offline

#2 2019-10-03 15:57:26

jeanpierreaubry
Guru
From: nantes (france)
Registered: 2009-03-12
Posts: 3,622

Re: [SOLVED] Number of threads used by code_aster

hello

i do not understand what you call number of threads

if i change the number of cpu (exactly number of core)
on my export files generated with Astk i have the line
ncpus 4
4 being the number of the physiscal core i have

the increase in speed depends on the problem and is not much

jean pierre aubry


consider reading my book
freely available here https://framabook.org/beginning-with-code_aster/

Offline

#3 2019-10-03 16:20:17

DeuxPi360
Member
Registered: 2016-04-01
Posts: 8

Re: [SOLVED] Number of threads used by code_aster

Hello M. Aubry

Thank you for answering.

The number of threads is meant by the real used CPU resource from code_aster. Although there is only 1 nbcpu and 1 nbnoeud in the export file (and my used MUMPS solver is not compiled for parallel processing), code_aster uses more threads than it should (see picture attached).

In the picture one can see that each code_aster job uses 3 threads (as mentioned in the --numthreads=3 parameter of the job)

I noticed this behavior only since switching from code_aster version 12.7 to 14.2.

Regards
Laurent


Attachments:
CPUusageASTER.png, Size: 20.17 KiB, Downloads: 80

Offline

#4 2019-10-08 17:43:47

DeuxPi360
Member
Registered: 2016-04-01
Posts: 8

Re: [SOLVED] Number of threads used by code_aster

Hello everyone

I found a way to make code_aster use only one thread. The following line should be in the .export file:

P ncpus 1

Regards
Laurent

Offline