Can I open more than one ElmerSolver simultaneously in a PC?

High Performance Computing with Elmer

Can I open more than one ElmerSolver simultaneously in a PC?

Postby Jenwel » 14 Oct 2017, 13:51

Hi dear Elmer designers,
I want to optimize the electrical machine with Elmer. Thus, many models with different shape and size should be calculated by Elmer.
I have tried the Elmer and MPI for parallel computation, but it solves even slower than only using a single CPU core for my model.

Now, I can use MATLAB to invoke the Gmsh, ElmerGrid and ElmerSolver to calculate my model. I want to know if it is possible to use MATLAB to run more than one ElmerSolvers to calculate differnt models simultaneously? So that during the optimization, different models can be calculated by ElmerSolvers in different threads or different CPU cores?

Thank you so much!

BR
Jenwel
Jenwel
 
Posts: 19
Joined: 22 Jun 2017, 07:07

Re: Can I open more than one ElmerSolver simultaneously in a PC?

Postby raback » 14 Oct 2017, 15:54

Yes, you can.

Just make sure you don't have any conflicts in I/O.

-Peter
raback
Site Admin
 
Posts: 3139
Joined: 22 Aug 2009, 11:57
Location: Espoo, Finland

Re: Can I open more than one ElmerSolver simultaneously in a PC?

Postby Jenwel » 15 Oct 2017, 10:59

Hi Peter,
Thank you again for your response.

I have opened the matlabpool as:
Code: Select all
matlabpool 3

and "parfor" for my loop.
The ElmerSolver is invoked in my m file of MATLAB as:
Code: Select all
[status, results]= system(strcat('ElmerSolver case_',num2str(i),'.sif'),'-echo');


I can find that additional 3 threads of MATLAB appear in the Windows task manager. But only one ElmerSolver is invoked and working.
Hence, all the models are still built and solved in sequence. :?
I do not know the reason.

Thank you in advance!

BR
Jenwel
Jenwel
 
Posts: 19
Joined: 22 Jun 2017, 07:07

Re: Can I open more than one ElmerSolver simultaneously in a PC?

Postby Jenwel » 15 Oct 2017, 15:45

Hi,
I have solved the problem now.

The reason is that the Elmer version with MPI can not be invoked by several MATLAB parallel threads. The MPI of MATLAB conflicts with the MPI of Elmer.
Hence, I re-install the Elmer version without MPI, it works.

BR
Jenwel
Jenwel
 
Posts: 19
Joined: 22 Jun 2017, 07:07


Return to HPC

Who is online

Users browsing this forum: No registered users and 1 guest