Bsub job does not execute the script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Bsub job does not execute the script
# 1  
Old 07-28-2016
Bsub job does not execute the script

Hello,

When I'm trying to send bsub job using script that executes fine in command line, I get nothing.

I do this for testing purposes, and the script scr_test is just one line:
Code:
pwd > outfile

So when I'm executing it in command line:
Code:
$ ./scr_test

it works fine producing the outfile with current directory path

When I'm submitting batch job:
Code:
$ bsub < ./scr_test

the job completes with no error message (DONE status) but no outfile is produced.

Another weird (at least to me) behavior is observed when I'm wrapping the script into batch script batch_test like this:
Code:
#!/bin/sh
#BATCH -J jobname
./scr_test

and submitting it like this:
Code:
$bsub < batch_test

with bsub job crashing with EXIT status (and of course no outfile).

Any tips on how properly submit bsub job (or how batch script should look) are very appreciated.

Last edited by Don Cragun; 07-28-2016 at 04:40 AM.. Reason: Change ICODE tags to CODE tags and add ICODE tags.
# 2  
Old 07-28-2016
The bsub utility does not appear to be supplied as part of a normal installation of any UNIX, Linux, or BSD based operating system. From a Google search, it appears that it is supplied on some university networks as a way to submit a job on one machine to run on some system on the same network as the system where the job is submitted.

On what system is the job you are submitting being run?

Have you looked for your output file in ALL of the possible directories mentioned in the bsub documentation where your job could have been run on every system on your network where the job might have been run?
This User Gave Thanks to Don Cragun For This Post:
# 3  
Old 07-28-2016
Thank you for responding.

The system is Linux:
Code:
$  name -a
Linux XXXXX YYYYYY #1 SMP Tue Nov 3 16:12:36 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

I checked log files, and it looks like the output is being saved in /tmp folder within a directory accessed by superuser only, so will check with them.

Thanks again.

Last edited by Don Cragun; 07-28-2016 at 03:54 PM.. Reason: Change HTML tags to CODE tags.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Bsub command

Hi everyone, I must write a Linux script for a biological analysis. I have an example for that which involves the "bsub" and "bsub-o" command, respectively. I cannot find a description for this command. Can you please help me? (2 Replies)
Discussion started by: Max_W
2 Replies

2. Shell Programming and Scripting

Adding a cron job that will execute everyday at 14:50 hrs

Hi I want to execute a cron job everyday at 14:50 hrs. I have a script like this: TMP_FILE="/tmp/tmpcron.txt" RES=0 /usr/bin/crontab -l >> $TMP_FILE ADD_JOB="50 14 * * * /opt/mypath/scriptname.sh" grep "scriptname.sh" $TMP_FILE >> /dev/null JOB_NOT_EXIST=$? if test $JOB_NOT_EXIST... (2 Replies)
Discussion started by: saurabhkoar
2 Replies

3. Shell Programming and Scripting

how do i execute nohup and background job inside the korn script for db2

load_cursor_stmt() { ls /db/admin/ddl/rmn01000/load_cursor*.sql|while read file do echo "${file}" `nohup db2 -tvf "$file" \&` done }Error: ------- /admin/ddl/rmn01000/load_cursor5.sql /db/admin/ddl/rmn01000/load_cursor6.sql + read file + echo... (3 Replies)
Discussion started by: Hangman2
3 Replies

4. Shell Programming and Scripting

Nightly job error message when trying to execute script

Hello All, I am getting the following error message when trying to execute the following script. AWK=/usr/bin/awk TR=/usr/bin/tr SED=/usr/bin/sed CAT=/usr/bin/cat MAILFILE=/home//nightly_jobs.tmp mailto=xxx@gmail.com Nigh_Status = `db2 "select TYPE from ETL.LOCK where STATUS <> 0 and... (12 Replies)
Discussion started by: NARESH1302
12 Replies

5. Shell Programming and Scripting

Script to Start a Job after finding the Old job completed

Hi Experts, I need a script advice to schedule 12 jobs ( SAS Codes execute back ground ). Algorithem: 1. Script checks first job. 2. Finds first job is done; invoke second job. 3. finds second job is done; invoke third job. .. Request you to please assist. (3 Replies)
Discussion started by: Jerald Nathan
3 Replies

6. UNIX for Dummies Questions & Answers

Writing a script to work sequentially with bsub

Hi, I am REALLY a newbie of Unix: hope this question is not too odd. Here is my problem: I have to submit jobs to a remote platform (an IBM BCX/5120). To submit I have tobsub < filename.jcf and the .jcf file has usually the following content: #!/bin/bash #BSUB <commands of the bsub>... (1 Reply)
Discussion started by: silky
1 Replies

7. Shell Programming and Scripting

unable to execute background job

I am unable to execute the below command in background. Plz suggest. #> ./test input >out & 913618 + Stopped (SIGTTIN) ./test input >out & Suresh (1 Reply)
Discussion started by: suresh3566
1 Replies

8. UNIX for Dummies Questions & Answers

a cron job needs a perl script to execute

Hello evreyone, this is my first post, and to say i'm new to this is an understatement. I know very little about perl scripts and hope some one can help me. i'm looking to get a script that a cron job can execute. what the script needs to to is 1) connect to a mysql database 2) go to a... (2 Replies)
Discussion started by: Exader
2 Replies

9. UNIX for Dummies Questions & Answers

CRON job to execute all scripts in a directory

Hi everyone: I'm trying to make a CRON job that will execute Fridays at 7am. I have the following: * 7 * * 5 I've been studying up on CRON and I know to have this in a file and then "crontab filename.txt" to add it to the CRON job list. The CRON part I believe I understand, but I would... (6 Replies)
Discussion started by: Annorax
6 Replies

10. UNIX for Dummies Questions & Answers

Cron job -- to execute at every first Sunday of every month

Dear all How can I schedule the cronjob to be run sometime at every first Sunday at every month? I have the edit the cronjob every month now, thanks (2 Replies)
Discussion started by: shanemcmahon
2 Replies
Login or Register to Ask a Question