PARALLELING COMPUTATION

Discussion about building and installing Elmer
Andrea_P
Posts: 176
Joined: 22 Mar 2021, 18:39
Antispam: Yes
Location: POLYTHECNIC UNIVERSITY OF TURIN

PARALLELING COMPUTATION

Post by Andrea_P »

Good morning Community,
I want to run a simulation with more than one processor, but I don't know how to do it. I have Elmer on a Fedora machine. I appreciate any help.
Regards,
Andrea
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: PARALLELING COMPUTATION

Post by kevinarden »

Do you run ElmerSolver for the GUI or a command line in general from a command line

You must first partition mesh to number of processors for example 4

ElmerGrid 2 2 Mymeshname -partdual -metiskway 4

then execute the mpi solver of the machine if it is openmpi then likely

mpirun -np 4 ElmerSolver_mpi

assuming the case.sif file is in the ELMERSOLER_STARTINFO file if not than

mpirun -np 4 ElmerSolver_mpi mycase.sif


If running from ElmerGUI go to run parallel settings and check parallel solver set number of processes, then set the commands in the window.
Andrea_P
Posts: 176
Joined: 22 Mar 2021, 18:39
Antispam: Yes
Location: POLYTHECNIC UNIVERSITY OF TURIN

Re: PARALLELING COMPUTATION

Post by Andrea_P »

kevinarden wrote: 16 Jun 2021, 17:54 Do you run ElmerSolver for the GUI or a command line in general from a command line

You must first partition mesh to number of processors for example 4

ElmerGrid 2 2 Mymeshname -partdual -metiskway 4

then execute the mpi solver of the machine if it is openmpi then likely

mpirun -np 4 ElmerSolver_mpi

assuming the case.sif file is in the ELMERSOLER_STARTINFO file if not than

mpirun -np 4 ElmerSolver_mpi mycase.sif


If running from ElmerGUI go to run parallel settings and check parallel solver set number of processes, then set the commands in the window.
I am in the last case, so do I have to write something in the case.sif?
-Andrea
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: PARALLELING COMPUTATION

Post by raback »

Hi

Usually sif file stays the same. There may be some features that do not work out of the box. It is good idea to verify that you get the same results in serial and parallel by comparing the results.

How many real cores do you have on your machine?

-Peter
Andrea_P
Posts: 176
Joined: 22 Mar 2021, 18:39
Antispam: Yes
Location: POLYTHECNIC UNIVERSITY OF TURIN

Re: PARALLELING COMPUTATION

Post by Andrea_P »

raback wrote: 16 Jun 2021, 22:01 Hi

Usually sif file stays the same. There may be some features that do not work out of the box. It is good idea to verify that you get the same results in serial and parallel by comparing the results.

How many real cores do you have on your machine?

-Peter
I think 128, it is a cluster
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: PARALLELING COMPUTATION

Post by kevinarden »

You go to run, parallel setting, check the box on hot select number of processes.
You will likely have to find the name of the mpi exectuable on the system, you can try the default, but it is probably different.
Attachments
parallel.png
(87.6 KiB) Not downloaded yet
Andrea_P
Posts: 176
Joined: 22 Mar 2021, 18:39
Antispam: Yes
Location: POLYTHECNIC UNIVERSITY OF TURIN

Re: PARALLELING COMPUTATION

Post by Andrea_P »

kevinarden wrote: 17 Jun 2021, 12:01 You go to run, parallel setting, check the box on hot select number of processes.
You will likely have to find the name of the mpi exectuable on the system, you can try the default, but it is probably different.
I have tried, but it does not work.
Attachments
output.txt
(5.3 KiB) Downloaded 208 times
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: PARALLELING COMPUTATION

Post by kevinarden »

Good news is that the mesh partition with ElmerGrid work

Problem is that last line in the output

Unable to start parallel solver

means that you do not have the right mpi executable name in executable field, either you have a different mpi solver installed on the system or there is no mpi solver on the system.
Andrea_P
Posts: 176
Joined: 22 Mar 2021, 18:39
Antispam: Yes
Location: POLYTHECNIC UNIVERSITY OF TURIN

Re: PARALLELING COMPUTATION

Post by Andrea_P »

kevinarden wrote: 17 Jun 2021, 12:56 Good news is that the mesh partition with ElmerGrid work

Problem is that last line in the output

Unable to start parallel solver

means that you do not have the right mpi executable name in executable field, either you have a different mpi solver installed on the system or there is no mpi solver on the system.
How can I check? By the way, could I use this function of Elmer in windows?
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: PARALLELING COMPUTATION

Post by kevinarden »

Yes it can be used in windows.

You could try mpiexec instead of mpirun, MPICH uses mpiexec.
Post Reply