LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 07:06 AM   #1
summit
Member
 
Registered: Nov 2010
Posts: 59

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, 07:09 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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, 07:13 AM   #3
summit
Member
 
Registered: Nov 2010
Posts: 59

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, 07:23 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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, 07:29 AM   #5
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 594

Rep: Reputation: 141Reputation: 141
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, 08:22 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,349

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
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 03:19 PM
increase upload speed kara_iran Linux - Server 4 06-01-2009 07:25 AM
increase code speed lmvent Programming 16 10-26-2005 03:43 PM
SPEED : How to increase? isone Linux - Newbie 1 10-29-2003 04:29 AM
increase hd speed saavik Linux - Hardware 3 07-23-2003 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:00 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
Open Source Consulting | Domain Registration