forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to use full cpu power in plato IDE ( fortran 95)?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato
View previous topic :: View next topic  
Author Message
mym1450



Joined: 08 May 2014
Posts: 3

PostPosted: Thu May 08, 2014 8:43 am    Post subject: how to use full cpu power in plato IDE ( fortran 95)? Reply with quote

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
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Thu May 08, 2014 10:19 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
mym1450



Joined: 08 May 2014
Posts: 3

PostPosted: Fri May 09, 2014 8:05 am    Post subject: Reply with quote

thanks, but i dont think so
i set the priority to high but no change is seen
pleas see this pic:
[/img]
Back to top
View user's profile Send private message
jalih



Joined: 30 Jul 2012
Posts: 196

PostPosted: Fri May 09, 2014 8:06 pm    Post subject: Re: Reply with quote

mym1450 wrote:
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.
Back to top
View user's profile Send private message
mym1450



Joined: 08 May 2014
Posts: 3

PostPosted: Sat May 10, 2014 8:52 am    Post subject: Reply with quote

thanks but how can i do this? my english is not good, can you say it simply for me please?
Back to top
View user's profile Send private message
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Sat May 10, 2014 6:22 pm    Post subject: Reply with quote

I must be doing things all wrong. I spent a couple of hours rearranging my program so it used less of my CPU. Rolling Eyes

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.
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group