Page 1 of 1

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

Posted: 14 Oct 2017, 13:51
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

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

Posted: 14 Oct 2017, 15:54
by raback
Yes, you can.

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

-Peter

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

Posted: 15 Oct 2017, 10:59
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

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

Posted: 15 Oct 2017, 15:45
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