running a parallel program


 
Thread Tools Search this Thread
Top Forums Programming running a parallel program
# 1  
Old 01-18-2006
running a parallel program

hi ,


i need to run a parallel program .


for example;

program1

{
array[]=" the second program should called here : program 2"

the execution should continue

}


the 2nd program should recieve an array of information as argument and it should process parallel with program 1.
# 2  
Old 01-18-2006
Quote:
Originally Posted by bankpro
hi ,


i need to run a parallel program .


for example;

program1

{
array[]=" the second program should called here : program 2"

the execution should continue

}


the 2nd program should recieve an array of information as argument and it should process parallel with program 1.

parallel execution - in a single processor system it is only pseudo parallelism that can be guaranteed and not the concurrent execution (concurreny is just a perception)

I dont find anything difficult or setback in making use of fork to split functionalities and proceed thereby
# 3  
Old 01-18-2006
I don't want the control to return back to the parent process. The child process should execute parallely with parent process.

According to fork definition, a child process is created which is the duplicate of parent process's program space. so, i don't think so fork will solve this problem
# 4  
Old 01-18-2006
I don't think that you are getting what matrixmadhan is trying to say here. When you fork, you can actually carry out two different tasks. One in the child and one in the parent.
The tasks will execute concurrently. If you have multiple processors, the processes may execute on different processors.
# 5  
Old 01-20-2006
<array[]=" the second program should called here : program 2">

what are you expecting here, should the second program return you multiple values, to fill the array ?

thats is not possible in a c program.
regarding concurrent processing ( or pseudo concurrency ) you can use fork for sure.

and programming for parallel processing on a system having multiple processor would be interesting tho. Do let me know if you find out how you can force your process to run on a particular processor. for eg, parent running on processor 1 and child on 2.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Running script in Parallel

Hi Folks I have a doubt. I have a script which is running with 2 input parameters ./GetDSLnkCount.sh <jobnumber> Parmfile.txt I need to run the script in parallel for different jobnumbers. The commands are ./GetDSLnkCount.sh jnhuc14500 Parmfile.txt ./GetDSLnkCount.sh jnhuc14501... (3 Replies)
Discussion started by: morbid_angel
3 Replies

2. Shell Programming and Scripting

Script running in parallel failing!

Hi, I have a single script that was running fine in parallel on Linux 2.6.9-89 now it has been upgraded to Linux 2.6.18-308.24.1.el5 and the script has started to fail unpredictably. Is this an upgrade issue? As the script runs fine for some parallel threads while fails for others. Please... (4 Replies)
Discussion started by: Panna
4 Replies

3. UNIX for Dummies Questions & Answers

Running parallel process

i am having 4 process,have to run parallel and not after one by one. sample1.sh sample2.sh sample3.sh sample4.sh Thanks in advance. i (11 Replies)
Discussion started by: sagar_1986
11 Replies

4. Programming

Program in parallel

Hi all I need to write a parallel program which is performs the operations below for each integer number in the range of 1 to 10000 and also: 1. Find out if the numbers are prime or square numbers. 2. Display the prime numbers in an array 3. Display the square numbers in a different array... (12 Replies)
Discussion started by: bestb
12 Replies

5. Shell Programming and Scripting

Running uniq -c and sort -nr in parallel.

Hi All, I have a huge collection of files in a directory about 200000. I have the command below but it only uses one core of the computer. I want it to do task in parallel. This is the command that I want to run in parallel: sort testfile | uniq -c | sort -nr I know how to run sort... (10 Replies)
Discussion started by: shoaibjameel123
10 Replies

6. Shell Programming and Scripting

Running jobs in parallel

I need to process 50 sqlplus scripts which are listed in a text file. I need to develop a shell script that'll read this file and run these sqlplus scripts. At any point of time, the number of sqlplus scripts running shouldn't exceed 6. If any of the sqlplus scripts completes successfully then... (17 Replies)
Discussion started by: gctex
17 Replies

7. Shell Programming and Scripting

Running shell script in parallel

Hi, I am a shell script which takes input parameters and performs various functions. My concern is, if we call the same shell script with different parameter values from different sessions, will the results be inconsistent? Are there any precautions I need to take inorder to avoid conflicts... (1 Reply)
Discussion started by: jamjam10k
1 Replies

8. UNIX for Dummies Questions & Answers

Parallel processing using AWK program

Hi All, could any expert tell me about writing a parallel processing program using AWK program is possible or not? Any example would be much appreciated... With Regards / Mysore Ganapati :confused: (5 Replies)
Discussion started by: ganapati
5 Replies

9. IP Networking

running servers parallel

I'm going to undertake a hardware refresh soon and I was wondering if it is possible to run two machines (X and Y) with the same hostname (but different IP addresses) on the same network? Server X is the original server and has an entry in DNS. Server Y is the new server and won't have an entry... (1 Reply)
Discussion started by: soliberus
1 Replies

10. Shell Programming and Scripting

Running scripts in parallel

Hi, Iam having the scripts as follows. i jus want to run those in parallel. main aim is to minimise the time for overall execution of the script. now out.txt is having 1 lac records. script1(split.sh) split -1000 out.txt splitout ls -A splitout* > filelist.txt cat filelist.txt... (6 Replies)
Discussion started by: nivas
6 Replies
Login or Register to Ask a Question