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

High Performance Computing with Elmer
Post Reply
Jenwel
Posts: 27
Joined: 22 Jun 2017, 07:07
Antispam: Yes
Contact:

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

Post by Jenwel »

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
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

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

Post by raback »

Yes, you can.

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

-Peter
Jenwel
Posts: 27
Joined: 22 Jun 2017, 07:07
Antispam: Yes
Contact:

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

Post by Jenwel »

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: 27
Joined: 22 Jun 2017, 07:07
Antispam: Yes
Contact:

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

Post by Jenwel »

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
Post Reply