Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For my Thesis I want to write fortran program. I have a K53-Sm ASUS laptop with core i7 and 8Gig ram. When I run my program my CPU usage is 13%. How can I increase my CPU usage to 100% on Ubuntu 13.04 and all of 8 cores CPU cores active?

share|improve this question

closed as too broad by Maythux, Braiam, karel, Eric Carvalho, psusi Mar 11 '14 at 13:59

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

what do you mean, do you want your CPU to be used at maximum all the time for testing ? or do you want ubuntu to use all the ressources all the time ? becaus e linux is design to use only the ressource it needs, so it meens your computer is 40% too powerfull – Kiwy Mar 11 '14 at 11:31
Show us your code, is your code supposed to use 100% of your CPU? It is written with threats in mind? If it's not is possible that you need to rewrite it. – Braiam Mar 11 '14 at 12:50
This question appears to be off-topic because it relates to the writing of multi-threaded FORTRAN code rather than anything specific to Ubuntu. – TooManyKooks Mar 11 '14 at 13:08

I'd suggest using the stress tool (to impose load on and stress test systems) available from the repos:

sudo apt-get install stress

Alternatively you could also try:

It will stress CPU integer and floating point paths. It also execises CPU path that deals with data and text cache misses.

share|improve this answer

You can install a power-management tool like TLP. That has a function which is turbo mode. The latter will give you all your CPU horsepower.

If you really want to use every single CPU to 100% you will probably also have to do some multi-threading programming, viz. create different simultaneous threads to do the computations at the same time.

share|improve this answer

You will have to implement a message passing interface so that the CPU's can communicate.The compiler will vectorize loops (enable Software parallelization but this is only basic level of parallelism,to make full use of your CPU you will have to implement a MPI.

Note that this will require you to restructure the program for this purpose.

You may also look into co-fortran.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.