The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > High Performance Computing
.
google unix.com



High Performance Computing Message Passing Interface (MPI) programming and tuning, MPI library installation and management, parallel administration tools, cluster monitoring, cluster optimization, and more HPC topics.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Parallel Job Execution Prashantckc Shell Programming and Scripting 4 05-02-2009 02:16 PM
Initial Experiments in Visualizing Fine-Grained Execution of Parallel Software Throug iBot UNIX and Linux RSS News 0 12-07-2008 04:10 AM
Parallel SSH execution and a single shell to control them all iBot UNIX and Linux RSS News 0 10-30-2008 04:50 AM
Make : parallel execution suman_jakkula AIX 0 03-14-2006 03:33 AM
Parallel Execution RishiPahuja Shell Programming and Scripting 4 05-10-2005 02:15 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-06-2009
123an 123an is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 5
Parallel Execution on Multiple System

Hi All,

I am working on a project where I need to execute set of arguments (around 500) on a Simulator. If I execute this on one linux (RedHat 8.0) machine it will approximately takes 2~3 days. Since I am having more linux machines am thinking of executing these on different machines in parallel(i.e. Paralle Execution).

I tried for sanity basis following option which is already posted in this forum;
i.e. Script1.sh & Script2.sh & Script3.sh . But I didn't find much savings in this option.

I also tried downloading a tool-JOBQUEUE from site "Download jobqueue 0.04 for Linux - jobqueue is a program for executing jobs in parallel to complete all jobs as fast as possible. - Softpedia".
This is able to split execution on multiple system, but it won't take all arguments list set (like if arguments set list has 10, it will take 8/9 skips 1 r 2).

Could you please help me in solving the problem.

Thanks in advance

Regards,
123an
  #2 (permalink)  
Old 02-06-2009
quirkasaurus's Avatar
quirkasaurus quirkasaurus is offline
Registered User
  
 

Join Date: Jan 2009
Location: canton, michigan
Posts: 373
not enough info for me...

are you talking about the same script with 500 different sets of arguments?
do you have the arguments already somewhere or
will you generate them?
should the jobs run in series once on their individual machine?
or can they run concurrently with a maximum threshold?

is this just for benchmarking? or is this going to be a permanent run and
everything should take about the same time?

i'm thinking . . . . just create all the command lines....
dump them all into a file...

then have another script, read this file,
divide them equally into scripts for each machine....
rcp these scripts to the respective machines,
and kick 'em off.
  #3 (permalink)  
Old 02-08-2009
123an 123an is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 5
More information regarding Parallel Execution

Hi quirkasaurus,

Thanks for ur reply..

As per ur reply i would like to give some more details about my problem,
I have 500 different set of arguments in a file(say list.txt). These arguments i need to pass to an executable (or an application; say "./applictn.out") which wil run and does the job taking each arguments. That means i will get 500 sets of outputs on executing whole system.
If I execute this using script serially(means one after other) execution wil take more time. so within a system i can execute this in parallel (i.e making them as background process) using xargs. Like
Syntax:xargs <utility> <arguments>
Given: xargs ./applictn.out list.txt..

This wil be executed in parallel on single system..

Now my problem is if i want to execute these sets(set of 500 arguments) on different linux systems, which should run in parallel. So that i should get output at lower amount of time.
parallelism i mean to say is, if mahine1 should take say 150 sets and start processing..
Machine 2 should take say 200 sets and starts processing..
machine 3 should take remaining in sets and should start working on it..

All machines should work in parallel...

Thanks..
123an





Quote:
Originally Posted by quirkasaurus View Post
not enough info for me...

are you talking about the same script with 500 different sets of arguments?
do you have the arguments already somewhere or
will you generate them?
should the jobs run in series once on their individual machine?
or can they run concurrently with a maximum threshold?

is this just for benchmarking? or is this going to be a permanent run and
everything should take about the same time?

i'm thinking . . . . just create all the command lines....
dump them all into a file...

then have another script, read this file,
divide them equally into scripts for each machine....
rcp these scripts to the respective machines,
and kick 'em off.
  #4 (permalink)  
Old 02-08-2009
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,661
Sounds to me like you need to implement and manage a Linux cluster.

Have you looked at any of the Linux clustering software in our directory?

High Performance Computing - Links
  #5 (permalink)  
Old 02-09-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,884
With GNU xargs, you can use the -P option to run jobs in parallel. So
Code:
cat input.txt | xargs -n 1 -P 4 myprogram
would run your program with each line of input provided as the arguments to myprogram, and 4 jobs would be started at a time.

To distribute among several Linux nodes, you can build a cluster, as Neo suggested.

OR you can use ssh/rsh to distribute run the jobs on the other hosts. First, make a file containing the hostnames of your cluster. If a host has 2 CPUs, have the hostname entry twice. If it has 4 cores, have 4 entries of that hostname.

From here you can go in different directions, but ultimately, you run one rsh/ssh process her line in this hosts file.
  #6 (permalink)  
Old 02-09-2009
123an 123an is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 5
Quote:
Originally Posted by otheus View Post
With GNU xargs, you can use the -P option to run jobs in parallel. So
Code:
cat input.txt | xargs -n 1 -P 4 myprogram
would run your program with each line of input provided as the arguments to myprogram, and 4 jobs would be started at a time.

To distribute among several Linux nodes, you can build a cluster, as Neo suggested.

OR you can use ssh/rsh to distribute run the jobs on the other hosts. First, make a file containing the hostnames of your cluster. If a host has 2 CPUs, have the hostname entry twice. If it has 4 cores, have 4 entries of that hostname.

From here you can go in different directions, but ultimately, you run one rsh/ssh process her line in this hosts file.
Hi Neo and otheus,

Thanks for ur valuable replies....

I am currently exploring all options suggested here....


Thanks...

123an
  #7 (permalink)  
Old 03-16-2009
123an 123an is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 5
Further Information about parallel execution

Quote:
Originally Posted by 123an View Post
Hi Neo and otheus,

Thanks for ur valuable replies....

I am currently exploring all options suggested here....


Thanks...

123an

Hi,

Thanks for ur replies...

I am trying to simulate the environment whatever has been discussed here using ssh.
I am facing following problem while using ssh. The same is explained below..

case1: ssh -f <machine_ip> <executable1> <arguments>
Here, arguments are listed in file and those wil be read during execution. In this scenario, the parallel execution works fine.

case2: ssh -f <machine_ip> <cp file1 file2> <executable2>
Here, the executable in 'case 2' won't take command line arguments as in case of 'case 1', i.e. executable wil always read input arguments from file with name "args".
so what i tried here is i have created multiple text files with different arguments, during ssh i tried to copy these text files to file "args" and tried to execute "executable 2". But i am receving an error saying "Cannot fork into background without a command to execute.".

Can anybody suggest me the solution for this???

Thanks,
123an
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On




All times are GMT -4. The time now is 10:12 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0