[Solved] Amount of used computing cores ?

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

Post Reply
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

[Solved] Amount of used computing cores ?

Post by herbk »

after a longer time not using CfdOF i stumbled about a few things, - mostly UI releatet, - and that the solver only works with one Core...
Didn't it work with cores in parallel before ?


Edit:

It took me a few days, but i get succes now.
openSuse (i think other linux distros to) clening up the repos and moving pakages...

At a fresh installation of openSuse Tumbleweed i took this steps to get CfdOF with full multicore calculation running:

Code: Select all

Needed steps to get CfdOF WB working (OpenSuse Tumbleweed)

This pakages have to be installed ( status 14.03.2023 ) : 

gmsh
zlib-devel
openfoam2206		(or earlyer)
openmpi1			
openmpi1-devel
python3-paraview


With OpenFoam and OpenMPI OpenSuse installs a Selector which needs to be configured.
For the type this comands at a terminal ( no root permission needed )

Für OpenFoam:
openfoam-selector-menu
select the version to use

Für OpenMPI
mpi-selector-menu
select openmpi1


Restart the computer !


If this is done, it’s possible to install cfMesh and Hisa

Both need a few minutes.
Attachments
Installationshinweise.pdf
(15.4 KiB) Downloaded 58 times
Last edited by herbk on Tue Mar 14, 2023 10:19 am, edited 1 time in total.
Gruß Herbert
User avatar
NewJoker
Veteran
Posts: 3069
Joined: Sun Oct 11, 2020 7:49 pm

Re: Amount of used computing cores ?

Post by NewJoker »

Is Parallel set to true and Parallel Cores set to the desired number of cores in your CfdSolver settings ?
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Amount of used computing cores ?

Post by herbk »

NewJoker wrote: Tue Mar 07, 2023 9:34 am Is Parallel set to true and Parallel Cores set to the desired number of cores in your CfdSolver settings ?
If o do so, i got

Code: Select all

 Simulation exited with error
and the Report view shows

Code: Select all

Decomposing mesh

Create mesh
14:08:25  
Calculating distribution of cells
Decomposition method scotch [4] (region region0)
14:08:25  
Finished decomposition in 0.05 s

Calculating original mesh data

Distributing cells to processors
14:08:25  
Distributing faces to processors

Distributing points to processors

Constructing processor meshes
Reading hexRef8 data : cellLevel
Reading hexRef8 data : pointLevel
14:08:25  
Processor 0
    Number of cells = 7196
    Number of faces shared with processor 1 = 244
    Number of faces shared with processor 2 = 12
    Number of faces shared with processor 3 = 132
14:08:25      Number of processor patches = 3
    Number of processor faces = 388
    Number of boundary faces = 3954

Processor 1
    Number of cells = 7188
    Number of faces shared with processor 0 = 244
    Number of faces shared with processor 2 = 120
14:08:25      Number of processor patches = 2
    Number of processor faces = 364
    Number of boundary faces = 3958

Processor 2
    Number of cells = 7208
    Number of faces shared with processor 0 = 12
    Number of faces shared with processor 1 = 120
    Number of faces shared with processor 3 = 220
14:08:25      Number of processor patches = 3
    Number of processor faces = 352
    Number of boundary faces = 4032

Processor 3
    Number of cells = 7200
    Number of faces shared with processor 0 = 132
    Number of faces shared with processor 2 = 220
14:08:25      Number of processor patches = 2
    Number of processor faces = 352
    Number of boundary faces = 3996

Number of processor faces = 728
Max number of cells = 7208 (0.13892748% above average 7198)
Max number of processor patches = 3 (20% above average 2.5)
Max number of faces between processors = 388 (6.5934066% above average 364)

Time = 0

Processor 0: field transfer
14:08:25  Processor 1: field transfer
14:08:25  Processor 2: field transfer
14:08:25  Processor 3: field transfer
14:08:25  
End

14:08:25  ./Allrun: Zeile 13: mpiexec: Kommando nicht gefunden.
14:08:25  

Code: Select all

OS: openSUSE Tumbleweed (KDE//usr/share/xsessions/plasma5)
Word size of FreeCAD: 64-bit
Version: 0.21.0.31556 (Git) AppImage
Build type: Release
Branch: master
Hash: 4091db47397f6e537a284f50c4f572545f3f30d0
Python 3.10.8, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * CfdOF 1.21.6
...
Gruß Herbert
User avatar
oliveroxtoby
Posts: 837
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Amount of used computing cores ?

Post by oliveroxtoby »

herbk wrote: Tue Mar 07, 2023 1:03 pm

Code: Select all

14:08:25  ./Allrun: Zeile 13: mpiexec: Kommando nicht gefunden.
14:08:25  
You are missing MPI on your system. Try installing a package like 'openmpi'.
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Amount of used computing cores ?

Post by herbk »

Hi Oliver
oliveroxtoby wrote: Thu Mar 09, 2023 6:14 am
herbk wrote: Tue Mar 07, 2023 1:03 pm

Code: Select all

14:08:25  ./Allrun: Zeile 13: mpiexec: Kommando nicht gefunden.
14:08:25  
You are missing MPI on your system. Try installing a package like 'openmpi'.
it is, - at this this system openmpi1 und openmpi3 is installed. At openSuse there is a selector, which points to the openmpi to use, installed to.
I switched the selctor to openmpi1, may be thats the problem, i'l try if it works if i switch to a different version.
Gruß Herbert
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Amount of used computing cores ?

Post by herbk »

oliveroxtoby wrote: Thu Mar 09, 2023 6:14 am ...
I tested several variants with mpi now:

Changing the mpi selctor to 1, 2, 3 or 4 (this mpi variants are availible at openSuse, at installing OpenFoam openSuse installs openmpi4 as default ) but got always the same error.
I try'd also reinstalling cfmesh and hisa after changing the mpi, - same error.

I not realy understand the code of that line 13 of Alwemake, but i guess it ponts to the locatoin where openmpi ist installed...
Where should be? Could it be that the presence of the mpiselector is't taken into account ?

Just some thoughts to fetch the problem...
Gruß Herbert
User avatar
oliveroxtoby
Posts: 837
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Amount of used computing cores ?

Post by oliveroxtoby »

herbk wrote: Thu Mar 09, 2023 3:08 pm
oliveroxtoby wrote: Thu Mar 09, 2023 6:14 am ...
I tested several variants with mpi now:

Changing the mpi selctor to 1, 2, 3 or 4 (this mpi variants are availible at openSuse, at installing OpenFoam openSuse installs openmpi4 as default ) but got always the same error.
I try'd also reinstalling cfmesh and hisa after changing the mpi, - same error.

I not realy understand the code of that line 13 of Alwemake, but i guess it ponts to the locatoin where openmpi ist installed...
Where should be? Could it be that the presence of the mpiselector is't taken into account ?

Just some thoughts to fetch the problem...
I don't have OpenSUSE to test with, but maybe this helps: https://en.opensuse.org/SDB:Openmpi_bin ... nd_in_PATH

Otherwise you may have to add the path to the executables manually to your system PATH variable.
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Amount of used computing cores ?

Post by herbk »

Thank you oliver,
but it's something different, if i run "mpi-selector --list" i got shon my installed mpi's.

Code: Select all

herbk@amd5700-lapi:~> mpi-selector --list
openmpi1
openmpi4
herbk@amd5700-lapi:~> 
Things i noted at trying to find a solution:

If i set Parallel to true, but set the amount of cores to 1 i get the same error.

If i have the solver setting at "Parallel false", set it to true and change the amount of cores i get the warning

Code: Select all

 failed to create compose table
But only if i do that the first time after opening the document, changing the amount again don't show it.

If i mesh the object, im in mind that all cores used, because the System monitor shows 100% processor load. Uses a process only 1 core, the System Monitor shows only about 8% (the amd5700 has a 6 cores / 12 threads kernel ).

Edit: after some other testings without succes, - adding the path to my .bashrc don't solve it to..
Gruß Herbert
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: [Solved] Amount of used computing cores ?

Post by herbk »

It took me a few days, but i get succes now.
openSuse (i think other linux distros to) clening up the repos and moving pakages...

At a fresh installation of openSuse Tumbleweed i took this steps to get CfdOF with full multicore calculation running:

Code: Select all

Needed steps to get CfdOF WB working (OpenSuse Tumbleweed)

This pakages have to be installed ( status 14.03.2023 ) : 

gmsh
zlib-devel
openfoam2206		(or earlyer)
openmpi1			
openmpi1-devel
python3-paraview


With OpenFoam and OpenMPI OpenSuse installs a Selector which needs to be configured.
For the type this comands at a terminal ( no root permission needed )

Für OpenFoam:
openfoam-selector-menu
select the version to use

Für OpenMPI
mpi-selector-menu
select openmpi1


Restart the computer !


If this is done, it’s possible to install cfMesh and Hisa

Both need a few minutes.
Attachments
Installationshinweise.pdf
(15.4 KiB) Downloaded 77 times
Gruß Herbert
lotnick
Posts: 5
Joined: Wed Dec 13, 2023 9:36 am

Re: [Solved] Amount of used computing cores ?

Post by lotnick »

After some successes in with CfdOf i got same error on line 13 of .allrun.

I decided to install newest MPI and now it works. ... So just letting you know. Thank you.
Post Reply