nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

speeding up execution

This is a discussion on speeding up execution within the Linux software forums, part of the Linux Getting Started category; My C programs do some math calculations that operate on bulk data. The exe files run for hours together & ...

Register free or login to your existing account and remove all advertisements.


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Linux answers from nixCraft.


Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-14-2005, 08:38 AM
Junior Member
User
 
Join Date: Sep 2005
OS: suse/redhat
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kavi
Default speeding up execution

My C programs do some math calculations that operate on bulk data. The exe files run for hours together & most have memory allocations. Some times i use top to check the programs using max cpu and find that my exe files take upto 99 percent cpu ( i have a 1.7Ghz processor). I thought of using parallel processing. I have one more computer but it has windows. Can anyone guide me about parallel processing between a Linux and Windows?
Reply With Quote
  #2 (permalink)  
Old 10-14-2005, 10:22 AM
sweta's Avatar
Contributors
User
 
Join Date: Feb 2005
Location: New Delhi
OS: Suse, RHEL, Vista
Posts: 199
Thanks: 12
Thanked 9 Times in 9 Posts
Rep Power: 7
sweta has a spectacular aura about sweta has a spectacular aura about
Default

You are right speeding-up the execution of a program by dividing the program into multiple fragments that can execute simultaneously, each on its own processor. A program being executed across N processors might execute N times faster than it would using a single processor.
You can do that with
* SMP Linux systems
* Clusters of networked Linux systems
* Parallel execution using MMX
* Attached (parallel) processors hosted by a Linux system
* PVM (Parallel Virtual Machine)
* ETC

I think PVM (Parallel Virtual Machine) should solve your problem. According PVM docs "
It is a software package that permits a heterogeneous collection of Unix/Linux and/or Windows computers hooked together by a network to be used as a single large parallel computer. Thus large computational problems can be solved more cost effectively by using the aggregate power and memory of many computers. The software is very portable. The source, which is available free thru netlib, has been compiled on everything from laptops to CRAYs.

PVM enables users to exploit their existing computer hardware to solve much larger problems at minimal additional cost. Hundreds of sites around the world are using PVM to solve important scientific, industrial, and medical problems in addition to PVM's use as an educational tool to teach parallel programming. With tens of thousands of users, PVM has become the de facto standard for distributed computing world-wide"

Visit http://www.csm.ornl.gov/pvm/ to download software and read docs.
__________________
Reply With Quote
  #3 (permalink)  
Old 10-14-2005, 12:14 PM
Junior Member
User
 
Join Date: Sep 2005
OS: suse/redhat
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kavi
Default

thanx for info. i am yet to go through the link you mentioned. A small query reg. the software u talked about. Do we need to modify our C source code to cater these softwares or just having these softwares properly configured on our network is enough. I presume i would learn more after i go through the link, but stil.
Reply With Quote
  #4 (permalink)  
Old 10-14-2005, 02:43 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Posts: 2,658
Thanks: 11
Thanked 237 Times in 177 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Naa it won't work out of box i.e you need to port your existing Applications to PVM; then only it will work. Your current program is for single x86 based ... it will never understand PVM so first you need to develope the distributed-memory parallel version of the application algorithm related to structure, and those related to efficiency.

Once you are done, then you will be able to take advantage of PVM and you can execute program Of course it increases complexity of program but then it delivers speed too
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #5 (permalink)  
Old 10-15-2005, 03:38 PM
Member
User
 
Join Date: Sep 2005
Posts: 30
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
charvi
Default

It is funny I visited PVM site and I think it is good but not for kavi's app; it will take more time to setup then you might expected... but good to see this kind of info get discuessed here
Reply With Quote
  #6 (permalink)  
Old 10-16-2005, 07:18 AM
Junior Member
User
 
Join Date: Sep 2005
OS: suse/redhat
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kavi
Default

Quote:
Originally Posted by charvi
It is funny I visited PVM site and I think it is good but not for kavi's app; it will take more time to setup then you might expected... but good to see this kind of info get discuessed here
You gave me a hint that its not good for my application. Well then i would be more than glad if you could give me a solution if you know. was just kidding!!
well i was about to starting working on PVM
Reply With Quote
  #7 (permalink)  
Old 10-16-2005, 05:31 PM
Member
User
 
Join Date: Sep 2005
Posts: 30
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
charvi
Default

Haa

i thought it will be too much work for home based two computers, if it is some sorta of big application which involved number crunching then you need this kind of technique. but then you see i'm noob in both programming and UNIX.. anyways let us know when you done through PVM.. like how you did it and how much time it took to install etc It may be useful to me or someone else in future

just my thought and all the best for PVM
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT +5.5. The time now is 07:03 PM.


Powered by vBulletin® Version 3.8.4 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2009 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38