hello every body when i run my program, plato only uses 20% of my cpu. how can i use 100% of my cpu to run fortran programes faster? my notebook: pavilion dv6 cpu: core i7 2670 thank you
how to use full cpu power in plato IDE ( fortran 95)?
You would not want to use 100% of the cpu. This would mean that your machine would not be able to do anything else whilst your program is running. It would be completely locked.
In theory you can increase the priority of a thread but there is no direct way, that I know of, to do this.
You might be able to do this by calling the API function AvSetMmMaxThreadCharacteristics (see 'Multimedia Class Scheduler Service' in the Microsoft Developer Network) but I suspect that this will make little or no difference.
Basically, it not a good idea to change from the default priority but increase in speed can often be obtained by optimising the code, for example by using /opt and by not using /checkmate etc.
thanks, but i dont think so
i set the priority to high but no change is seen
pleas see this pic:
[URL=http://upload7.ir/]
[/URL][/img]
Quoted from mym1450 thanks, but i dont think so i set the priority to high but no change is seen pleas see this pic: ...
Picture looks as expected to me. Your processor got four cores and one core is hard at work running your program. You need to use multiple threads in your code to get higher processor utilization.
thanks but how can i do this? my english is not good, can you say it simply for me please?
I must be doing things all wrong. I spent a couple of hours rearranging my program so it used [u:9d52fc31c9]less[/u:9d52fc31c9] of my CPU. :roll:
If you want to use more cores, you will need to identify what parts of your program can be parallelized, then use a suitable API to spread the work across your processor cores. You can use OpenMP for this but it isn't supported with this compiler.
It looks like your processor has 4 cores and hyperthreading so you could run your program with 8 threads. However, this will slow down the other programs and processes on your machine, so isn't really a good idea, even if you can parallelise part of your program.