Submitting multiple qsub jobs


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Submitting multiple qsub jobs
# 8  
Old 11-01-2015
I have no idea whether or not qsub is installed on your system or not. And, if it is installed, I have no idea what directory was specified when it was installed. But, in addition to that problem, bash (and any other shell that supports basic POSIX standard shell requirements) has a pre-initialized variable naming the current working directory, and you can't quote a filename pattern if you want the pattern to be expanded to a list of matching files. To protect yourself against whitespace characters in filenames and pathnames, you should also double-quote the variable expansions.

After you set and exported PATH to include the directory in which you have installed qsub, you might want to try something more like:
Code:
#!/bin/bash

for i0 in run_*.sh
do	qsub -d "$PWD" "$i0"
done

# 9  
Old 11-01-2015
I have tried the code that you suggest, but it also has the same problem.
However, when I am trying to run a single simulation, "qsub" works well.

If I want to run the "runAll.sh" file, I use a command which is "qsub runAll.sh".
I think if I utilize appropriate options for qsub command, it can help to solve the issue.
But, it is hard to guess which option is appropriate for the simulation.

Could you suggest any qsub options for submitting this sh file?


Thanks a lot!

Last edited by syg3434; 11-01-2015 at 01:42 AM..
# 10  
Old 11-01-2015
Quote:
Originally Posted by syg3434
I have tried the code that you suggest, but it also has the same problem.
However, when I am trying to run a single simulation, "qsub" works well.

If I want to run the "runAll.sh" file, I use a command which is "qsub runAll.sh".
I think if I utilize appropriate options for qsub command, it can help to solve the issue.
But, it is hard to guess which option is appropriate for the simulation.

Could you suggest any qsub options for submitting this sh file?


Thanks a lot!
It appears that you completely ignored:
Quote:
After you set and exported PATH to include the directory in which you have installed qsub, ...
in my last response. I can't suggest anything on how to use qsub other than to try the code that you said is already working. I don't have qsub installed on my machine, and the qsub man page I found doesn't have the -d directory option that you're using. But, there is clearly no way that adding options to qsub is going to make any difference if qsub can't be found in your $PATH and you don't specify an absolute pathname to where you have installed qsub on your system. All I can do is help you with the bash shell syntax.
# 11  
Old 11-01-2015
And, do you know how to find a path for qcommands?
Qcommands are already installed by the system manager so that I do not know where the path is.
So, I tried to find it, but it is hard to do it.



Thanks for your kind help.
I really appreciate it.

Last edited by syg3434; 11-01-2015 at 02:36 AM..
# 12  
Old 11-01-2015
That might be an alias. Please post the output of alias qsub. Or, the outputs of type qsub and whereis qsub might help.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to run multiple cron jobs?

I have two scripts which I'm tying to run one after the other- this is what I've tried: 00 14 * * * /path/one.sh && /path/two.sh I've also tried putting each script on a different line: 00 14 * * * /path/one.sh 00 14 * * * /path/two.sh Can this be done? (1 Reply)
Discussion started by: $shell_Learner
1 Replies

2. Shell Programming and Scripting

Shell script to run multiple jobs and it's dependent jobs

I have multiple jobs and each job dependent on other job. Each Job generates a log and If job completed successfully log file end's with JOB ENDED SUCCESSFULLY message and if it failed then it will end with JOB ENDED with FAILURE. I need an help how to start. Attaching the JOB dependency... (3 Replies)
Discussion started by: santoshkumarkal
3 Replies

3. Shell Programming and Scripting

Help submitting jobs to cluster

Hi I am new to submitting jobs. I am trying to submit my perl file to the cluster. This is what my shell file looks like (shell1.sh): #!/bin/sh #$ -S /bin/sh cd data/projects/mydir/abbc perl autocorro.pl followed by qsub shell1.sh It takes the qsub, but does nothing. I check... (1 Reply)
Discussion started by: theawknewbie
1 Replies

4. Shell Programming and Scripting

How to View multiple Cron jobs

Hi, I ran two crontab commands using: crontab program1 crontab program2 However when I type crontab -l only the second cron job shows up, how do I see all cron jobs running and how do I edit all at the same time Thanks in Advance S:D (10 Replies)
Discussion started by: walforum
10 Replies

5. Shell Programming and Scripting

Multiple jobs reading from same file

I have a sequence of tasks that I routinely run and I'm trying to parallelize certain portions of the sequence. Specifically, there are 3 tasks which all read from the same file, each performing different operations and writing to their own seperate file. I was wondering if I could execute these... (3 Replies)
Discussion started by: erichpowell
3 Replies

6. UNIX for Advanced & Expert Users

Problem Running qsub multiple jobs

Hello, I have a perl script that takes in one file of input and outputs to a file. I would like to run this script on several input files, and I would like to run it with qsub, something like this: Input files: FileListDssp.txt.numaa FileListDssp.txt.numab FileListDssp.txt.numac etc.. ... (1 Reply)
Discussion started by: InfoSeeker
1 Replies

7. Shell Programming and Scripting

Multiple jobs in perl

Hello, I would like to write a perl script which executes several jobs. The key thing is I only want 4 jobs to be executed at one time (that's because my machine as 4 cpu, and I want one job per cpu). Is there any way that I can get perl to co-operate with me in this? Thanks! (1 Reply)
Discussion started by: amcrisan
1 Replies

8. Shell Programming and Scripting

monitoring multiple jobs Unix

I have a list of jobs. their expected start time and their expected duration. my needs are monitor multiple jobs (starting at different time and their execution time also differs) Need to mail if any of the job running longer than its expected duration. Whats the efficient way to scripting... (1 Reply)
Discussion started by: vikram3.r
1 Replies

9. UNIX for Advanced & Expert Users

Submitting jobs remotely...Experts help reqd

Is there any way I can submit a job to a remote machine and return immediately without withing for the job to finish? What I mean is this...using rsh I can submit a job to a remote machine like this: rsh remotemac1 job.sh But this doesn't return untill the job has finished and as a... (3 Replies)
Discussion started by: arijit
3 Replies

10. UNIX for Dummies Questions & Answers

.netrc multiple ftp jobs to same machine

I have an ftp user, which has been setup to run ftp jobs to a specific machine (different jobs). for the first job i created .netrc in the ftp users home directory and added the appropriate commands machine FTPBOX01 login user1 password xxx macdef init etc etc get file bye I use the... (3 Replies)
Discussion started by: hcclnoodles
3 Replies
Login or Register to Ask a Question