LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-24-2012, 08:06 AM   #1
summit
Member
 
Registered: Nov 2010
Posts: 53

Rep: Reputation: 0
to increase the speed


Hi LinuxExperts,

I am using Scientific linux. I am using simulation toolkit Geant4. For this, I am using terminal to run and compile the program (GCC). I have core i5 processor. For running the program, how can I use all the four cores for it so that I can increase the speed???

Please suggest me.

Thanks in advance,
Summit
 
Old 05-24-2012, 08:09 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
You have to make your program to make use of multi-threading. There is no automagic way to do that, your program has to be written in that way.
 
Old 05-24-2012, 08:13 AM   #3
summit
Member
 
Registered: Nov 2010
Posts: 53

Original Poster
Rep: Reputation: 0
Hi

Thanks for reply

Can you tell me how can I make the program to use multi-threading?
any idea pls?

---------- Post added 05-24-12 at 05:44 PM ----------

or it have to do during make as make -j4 or something else???
 
Old 05-24-2012, 08:23 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
make -j4 will only speed up the compiling, not the program itself.
As I can see it Geant4 uses C++, so you have to learn how to do proper multithreading in C++ and in which way you can use that knowledge with the Geant4 framework. Since I neither program in C++ nor know much about Geant4 I can't help you with that.
 
Old 05-24-2012, 08:29 AM   #5
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 592

Rep: Reputation: 140Reputation: 140
If you want the program to make use of your four cores you need Geant4-MT. The make -j4 option is only to speed up the compilation (creation) time of the program. And that is a one time proces. Until there is a new version of course and you want to use the new functions or get rid of a annoying bug, then you have to compile the new program ones.
 
Old 05-24-2012, 09:22 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
Quote:
Can you tell me how can I make the program to use multi-threading?
See the advice above and I'd also recommend asking the Mods (via the Report button) to move this to the Programming forum.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload speed limiting to increase download speed dangerousdave Linux - Networking 6 02-16-2010 04:19 PM
increase upload speed kara_iran Linux - Server 4 06-01-2009 08:25 AM
increase code speed lmvent Programming 16 10-26-2005 04:43 PM
SPEED : How to increase? isone Linux - Newbie 1 10-29-2003 05:29 AM
increase hd speed saavik Linux - Hardware 3 07-23-2003 11:54 AM


All times are GMT -5. The time now is 06:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration