Problem about parallel computing in COMSOL

Please login with a confirmed email address before reporting spam

i am doing structural optimization by Genetic algorithm using COMSOL with Matlab so i need to run many iteration and cost too much time. i want to know if there are some "parallel computing" function in COMSOL, whch can improve and reduce computing time, thank you

ps. I use Eigenfrequency study(Parameter sweep) to sovle my case.


4 Replies Last Post 2018年6月28日 GMT-0400下午9:28

Please login with a confirmed email address before reporting spam

Posted: 4 months ago 2018年6月17日 GMT-0400上午1:57

now i can establish many port server, my question is if i log out the port, is the work in the port still working?

now i can establish many port server, my question is if i log out the port, is the work in the port still working?

Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 months ago 2018年6月21日 GMT-0400上午4:09

You can set up your simulation as a parametric sweep and ditribute the work on a cluster if you have a FNL license.

You can only make one working connection from a Matlab program to a Comsol server. If you start the server using the -multi argument the server will not stop when you disconnect from the server. Any models loaded on the server will remain in the server.

However, you can only solve one model at a time on a server unless you use Comsol's cluster features.

-------------------
Lars Gregersen
Comsol Denmark
You can set up your simulation as a parametric sweep and ditribute the work on a cluster if you have a FNL license. You can only make one working connection from a Matlab program to a Comsol server. If you start the server using the -multi argument the server will not stop when you disconnect from the server. Any models loaded on the server will remain in the server. However, you can only solve one model at a time on a server unless you use Comsol's cluster features.

Please login with a confirmed email address before reporting spam

Posted: 4 months ago 2018年6月25日 GMT-0400下午12:12

To Lars Gregersen: Thanks for your reply, first, you r right, when i leave the comport, the model is still in the server but different comport, but i don't care about that because when i finish the calaulation, even in the same port, the new model i built will cover the original model, so it is OK for me. i have already success run multi eigenfrequency study model simutaniously by distributing matlab workers (in my case, i use 4 cpu to run) to server via different comports (set 4 comports). it save me about half time than original case which just running one case at the same time. the only thing i dont know is the calculation time, because during evolving,
in the begining, the time elipsed almost the same (about 1300s), about fifteen generation it seems become slow (about 6500s), but the used memory is always about 20G without increase, CPU is about 70% running, maybe u know how to solve this problem. i just dont know the problem is from running comsol at same time or from matlab command "parfor" thank you

To Lars Gregersen: Thanks for your reply, first, you r right, when i leave the comport, the model is still in the server but different comport, but i don't care about that because when i finish the calaulation, even in the same port, the new model i built will cover the original model, so it is OK for me. i have already success run multi eigenfrequency study model simutaniously by distributing matlab workers (in my case, i use 4 cpu to run) to server via different comports (set 4 comports). it save me about half time than original case which just running one case at the same time. the only thing i dont know is the calculation time, because during evolving, in the begining, the time elipsed almost the same (about 1300s), about fifteen generation it seems become slow (about 6500s), but the used memory is always about 20G without increase, CPU is about 70% running, maybe u know how to solve this problem. i just dont know the problem is from running comsol at same time or from matlab command "parfor" thank you

Please login with a confirmed email address before reporting spam

Posted: 4 months ago 2018年6月28日 GMT-0400下午9:28

Hello Liu and Lars. I think this issue gets a bit more complex when you add the MATLAB dependence. It is my understanding that to run distributed parallel jobs with COMSOL and MATLAB linked, you not only have to have the FNL for COMSOL, but you also have to have multiple licenses for MATLAB for every instance of MATLAB that will be running simultaneously while running COMSOL. MATLAB does also have a parallel version which costs more, but I think that it only support the shared-memory parallelism in COMSOL and does not support distributed parallel jobs. I believe the only way that MATLAB will run distributed parallel is to purchase multiple licenses. Indeed, this is similar to what a lot of software companies do to users for parallel processing. COMSOL is certainly favored with the license policy provided by FNL for running in parallel. My suggestion for running parallel would be to purchase the FNL of COMSOL, and revise your model to remove the MATLAB dependence if possible. Lars, please correct me if I am wrong about this.

-------------------
James D. Freels, Ph.D., P.E.
Hello Liu and Lars. I think this issue gets a bit more complex when you add the MATLAB dependence. It is my understanding that to run distributed parallel jobs with COMSOL and MATLAB linked, you not only have to have the FNL for COMSOL, but you also have to have multiple licenses for MATLAB for every instance of MATLAB that will be running simultaneously while running COMSOL. MATLAB does also have a parallel version which costs more, but I think that it only support the shared-memory parallelism in COMSOL and does not support distributed parallel jobs. I believe the only way that MATLAB will run distributed parallel is to purchase multiple licenses. Indeed, this is similar to what a lot of software companies do to users for parallel processing. COMSOL is certainly favored with the license policy provided by FNL for running in parallel. My suggestion for running parallel would be to purchase the FNL of COMSOL, and revise your model to remove the MATLAB dependence if possible. Lars, please correct me if I am wrong about this.

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.