Sponsored Content
Full Discussion: Parallel Job Execution
Top Forums Shell Programming and Scripting Parallel Job Execution Post 302261247 by Prashantckc on Monday 24th of November 2008 05:51:37 AM
Old 11-24-2008
Parallel Job Execution

Hi All,
At present I am using a UNIX Script which is running a set of JOBS. These JOBS are to be repeated for 20 times, means the same set of JOBS are repeated by just passing different arguments (From 1 to 20).

Is there any way by which I can execute them parallel?

At present its all sequential process of executing the same set of JOBS one at a time.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parallel Execution

Hello, I wish to run parallel process forked from one script. Currently I doing is submit them in background. For example: --------------------------------------------------------------- #!/usr/bin/ksh process1 & process2 & process3 & ..... ..... #here I check for completion of... (4 Replies)
Discussion started by: RishiPahuja
4 Replies

2. AIX

Make : parallel execution

Hi, Is there any way to run parallel jobs using make command? I am using non-GNU make utility on AIX 4.3. I want to run 2 jobs symultaneously using make utility. Thanks. Suman (0 Replies)
Discussion started by: suman_jakkula
0 Replies

3. Shell Programming and Scripting

Job Execution in Parallel and Maintain Dependency

All, We need to run multiple jobs in parallel with the dependencies intact. I was trying to use the same with &, but in vain. Is there is any other way to resolve this issue. I need to run Set1 A.sh B.sh C.sh Set2 D.sh E.sh Set3 F.sh (10 Replies)
Discussion started by: anand_msm
10 Replies

4. High Performance Computing

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... (7 Replies)
Discussion started by: 123an
7 Replies

5. Shell Programming and Scripting

Conditional execution and parallel jobs

how can i process jobs parallel with conditions below. Script1.ksh Script2.ksh Script3.ksh Script4.ksh Script5.ksh Script6.ksh Script7.ksh Script8.ksh Script9.ksh Script10.ksh After successful completion of Script1.ksh I need to run Script7.ksh. After successful... (4 Replies)
Discussion started by: ford2020
4 Replies

6. Shell Programming and Scripting

Parallel execution of script not syncronize

I am haveing 2 scripts, 1st script calls 2ed script for each parameter.(parameters are kept in a different txt file) 1st script for x in `cat Export_Tables_List.txt` do sh Exp_Table.sh $x & done echo -e "1) following tables are successfully exported : \n" > temp cat... (1 Reply)
Discussion started by: sbmk_design
1 Replies

7. Programming

Parallel Execution of Programs

Since there've been a few requests for a method to execute commands on multiple CPUs (logical or physical), with various levels of shell-, make-, or Perl-based solutions, ranging from well-done to well-meant, and mostly specific to a certain problem, I've started to write a C-based solution... (4 Replies)
Discussion started by: pludi
4 Replies

8. UNIX for Advanced & Expert Users

Parallel Execution of Command

Hi All, We have a table that has to store around 80-100 million records. The table is partitioned by a column called Market Code. There are 30 partitions each corresponding to one MRKT_CD. The source of this table is a join between 3-4 other tables. We are loading this table through SQLPLUS... (2 Replies)
Discussion started by: jerome_rajan
2 Replies

9. Shell Programming and Scripting

How to make parallel execution on folder ?

I have few very huge files ~ 2 Billion rows of 130 column(CDR data) in a folder, I have written shell script need to read on each file in a folder and will create a new files based on some logic. But problem is it's taking time to create a new file due to the size , So i dont want to corrupt... (6 Replies)
Discussion started by: rspwilliam
6 Replies

10. Shell Programming and Scripting

Parallel execution of Oracle PROC in UNIX

Hi, Trying to run the Oracle Proc in parallel, but not working.. below code runs each call of the procedure and its coming out of the loop before its completion and printing the last statement! not waiting for the sqlplus to complete. for name in `cat abc.txt` do (sqlplus -s ... (3 Replies)
Discussion started by: ATWC
3 Replies
JOBS(1P)						     POSIX Programmer's Manual							  JOBS(1P)

PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond- ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. NAME
jobs - display status of jobs in the current session SYNOPSIS
jobs [-l| -p][job_id...] DESCRIPTION
The jobs utility shall display the status of jobs that were started in the current shell environment; see Shell Execution Environment . When jobs reports the termination status of a job, the shell shall remove its process ID from the list of those "known in the current shell execution environment''; see Asynchronous Lists . OPTIONS
The jobs utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines. The following options shall be supported: -l (The letter ell.) Provide more information about each job listed. This information shall include the job number, current job, process group ID, state, and the command that formed the job. -p Display only the process IDs for the process group leaders of the selected jobs. By default, the jobs utility shall display the status of all stopped jobs, running background jobs and all jobs whose status has changed and have not been reported by the shell. OPERANDS
The following operand shall be supported: job_id Specifies the jobs for which the status is to be displayed. If no job_id is given, the status information for all jobs shall be dis- played. The format of job_id is described in the Base Definitions volume of IEEE Std 1003.1-2001, Section 3.203, Job Control Job ID. STDIN
Not used. INPUT FILES
None. ENVIRONMENT VARIABLES
The following environment variables shall affect the execution of jobs: LANG Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of IEEE Std 1003.1-2001, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.) LC_ALL If set to a non-empty string value, override the values of all the other internationalization variables. LC_CTYPE Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments). LC_MESSAGES Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error and informative messages written to standard output. NLSPATH Determine the location of message catalogs for the processing of LC_MESSAGES . ASYNCHRONOUS EVENTS
Default. STDOUT
If the -p option is specified, the output shall consist of one line for each process ID: "%d ", <process ID> Otherwise, if the -l option is not specified, the output shall be a series of lines of the form: "[%d] %c %s %s ", <job-number>, <current>, <state>, <command> where the fields shall be as follows: <current> The character '+' identifies the job that would be used as a default for the fg or bg utilities; this job can also be specified using the job_id %+ or "%%" . The character '-' identifies the job that would become the default if the current default job were to exit; this job can also be specified using the job_id %-. For other jobs, this field is a <space>. At most one job can be identified with '+' and at most one job can be identified with '-' . If there is any suspended job, then the current job shall be a suspended job. If there are at least two suspended jobs, then the previous job also shall be a suspended job. <job-number> A number that can be used to identify the process group to the wait, fg, bg, and kill utilities. Using these utilities, the job can be identified by prefixing the job number with '%' . <state> One of the following strings (in the POSIX locale): Running Indicates that the job has not been suspended by a signal and has not exited. Done Indicates that the job completed and returned exit status zero. Done(code) Indicates that the job completed normally and that it exited with the specified non-zero exit status, code, expressed as a decimal number. Stopped Indicates that the job was suspended by the SIGTSTP signal. Stopped (SIGTSTP) Indicates that the job was suspended by the SIGTSTP signal. Stopped (SIGSTOP) Indicates that the job was suspended by the SIGSTOP signal. Stopped (SIGTTIN) Indicates that the job was suspended by the SIGTTIN signal. Stopped (SIGTTOU) Indicates that the job was suspended by the SIGTTOU signal. The implementation may substitute the string Suspended in place of Stopped. If the job was terminated by a signal, the format of <state> is unspecified, but it shall be visibly distinct from all of the other <state> formats shown here and shall indicate the name or description of the signal causing the termination. <command> The associated command that was given to the shell. If the -l option is specified, a field containing the process group ID shall be inserted before the <state> field. Also, more processes in a process group may be output on separate lines, using only the process ID and <command> fields. STDERR
The standard error shall be used only for diagnostic messages. OUTPUT FILES
None. EXTENDED DESCRIPTION
None. EXIT STATUS
The following exit values shall be returned: 0 Successful completion. >0 An error occurred. CONSEQUENCES OF ERRORS
Default. The following sections are informative. APPLICATION USAGE
The -p option is the only portable way to find out the process group of a job because different implementations have different strategies for defining the process group of the job. Usage such as $( jobs -p) provides a way of referring to the process group of the job in an implementation-independent way. The jobs utility does not work as expected when it is operating in its own utility execution environment because that environment has no applicable jobs to manipulate. See the APPLICATION USAGE section for bg . For this reason, jobs is generally implemented as a shell regular built-in. EXAMPLES
None. RATIONALE
Both "%%" and "%+" are used to refer to the current job. Both forms are of equal validity-the "%%" mirroring "$$" and "%+" mirroring the output of jobs. Both forms reflect historical practice of the KornShell and the C shell with job control. The job control features provided by bg, fg, and jobs are based on the KornShell. The standard developers examined the characteristics of the C shell versions of these utilities and found that differences exist. Despite widespread use of the C shell, the KornShell versions were selected for this volume of IEEE Std 1003.1-2001 to maintain a degree of uniformity with the rest of the KornShell features selected (such as the very popular command line editing features). The jobs utility is not dependent on the job control option, as are the seemingly related bg and fg utilities because jobs is useful for examining background jobs, regardless of the condition of job control. When the user has invoked a set +m command and job control has been turned off, jobs can still be used to examine the background jobs associated with that current session. Similarly, kill can then be used to kill background jobs with kill% <background job number>. The output for terminated jobs is left unspecified to accommodate various historical systems. The following formats have been witnessed: 1. Killed( signal name) 2. signal name 3. signal name( coredump) 4. signal description- core dumped Most users should be able to understand these formats, although it means that applications have trouble parsing them. The calculation of job IDs was not described since this would suggest an implementation, which may impose unnecessary restrictions. In an early proposal, a -n option was included to "Display the status of jobs that have changed, exited, or stopped since the last status report". It was removed because the shell always writes any changed status of jobs before each prompt. FUTURE DIRECTIONS
None. SEE ALSO
Shell Execution Environment, bg, fg, kill(), wait() COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html . IEEE
/The Open Group 2003 JOBS(1P)
All times are GMT -4. The time now is 09:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy