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
Can I open more than one ElmerSolver simultaneously in a PC?
-
- Site Admin
- Posts: 4700
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Can I open more than one ElmerSolver simultaneously in a PC?
Yes, you can.
Just make sure you don't have any conflicts in I/O.
-Peter
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?
Hi Peter,
Thank you again for your response.
I have opened the matlabpool as:
and "parfor" for my loop.
The ElmerSolver is invoked in my m file of MATLAB as:
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
Thank you again for your response.
I have opened the matlabpool as:
Code: Select all
matlabpool 3
The ElmerSolver is invoked in my m file of MATLAB as:
Code: Select all
[status, results]= system(strcat('ElmerSolver case_',num2str(i),'.sif'),'-echo');
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?
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
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