Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

How to define for comsol to use only one cpu for the solution? Also using the full memory.

Please login with a confirmed email address before reporting spam

When I run Comsol Sometimes I need it to work only with one CPU. Is there any option anywhere to do that or Comsol automatically decides on that?

Also for some solutions, I noticed my CPU is at 87% and memory is at 67%. How can change the settings so that it uses 100% of both?

3 Replies Last Post 6 giu 2016, 11:32 GMT-4
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 3 giu 2016, 17:33 GMT-4
If you are running a modern version of MS Windows, start up the Task Manager (via ctl-alt-del) . Go to the "details" tab where you can see the processes. One of them is comsol.exe . Right-click on comsol.exe and select "Set affinity" from the list. This opens a window where you can choose which CPU's to allow Comsol Multiphysics to use. (The default is that all are enabled.) This same CPU-assigning tool also can be used with other Windows programs.

Regarding your second question: First, about the CPU usage, not all processes can be fully-parallelized at all stages of execution. And because of I/O and other tasks, not all computation time occurs at the fastest conceivable rates. Second, about the memory usage, you shouldn't want it to use all of your memory! When you get to 100% of memory use, you are out of memory.

Hope that helps.
If you are running a modern version of MS Windows, start up the Task Manager (via ctl-alt-del) . Go to the "details" tab where you can see the processes. One of them is comsol.exe . Right-click on comsol.exe and select "Set affinity" from the list. This opens a window where you can choose which CPU's to allow Comsol Multiphysics to use. (The default is that all are enabled.) This same CPU-assigning tool also can be used with other Windows programs. Regarding your second question: First, about the CPU usage, not all processes can be fully-parallelized at all stages of execution. And because of I/O and other tasks, not all computation time occurs at the fastest conceivable rates. Second, about the memory usage, you shouldn't want it to use all of your memory! When you get to 100% of memory use, you are out of memory. Hope that helps.

Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 6 giu 2016, 07:48 GMT-4
Hi

You can adjust the number of CPUs that Comsol uses by using the -np command line argument.


--
Lars Gregersen
Comsol Denmark
Hi You can adjust the number of CPUs that Comsol uses by using the -np command line argument. -- Lars Gregersen Comsol Denmark

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 6 giu 2016, 11:32 GMT-4
Should I do it in batch mode/Matlab? (Other than that I can not find where the command line is inside the Comsol)
Should I do it in batch mode/Matlab? (Other than that I can not find where the command line is inside the Comsol)

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.