LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-26-2013, 11:10 AM   #1
wilcherrera
LQ Newbie
 
Registered: Sep 2012
Posts: 1

Rep: Reputation: Disabled
How to submit script with qsub that compiles 2 codes in C and runs both sequentially


I would like to write and submit a script (script.sh)to a node in a cluster, using qsub such that:

1. Compiles a code A: gcc -lm A.c -o A
2. Runs the code: ./A
3. Compiles a code B: gcc -lm B.c -o B
4. Runs the code: ./B

Note. The code B should start running after code A stops running (Code B requires the output of code A). I would like to make this as automatic as possible, so I just have to type

qsub script.sh

I would appreciate any help.

I'm sorry if this is a too trivial question, but I'm really new in these stuff.
 
Old 08-05-2013, 11:14 AM   #2
salsalinux
LQ Newbie
 
Registered: May 2013
Location: Utah
Distribution: Mint, Debian, CentOS
Posts: 10

Rep: Reputation: Disabled
Have you tried running the script? If so, what results did it give you? Did it run program A and B simultaneously?

It sounds like it should just run straight through the script, from the top down, as far as I can tell.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bash script to run sequentially dpynn Linux - Software 11 02-27-2012 07:51 AM
GCC compiles, program runs, but only in a CERTAIN directory The_Nerd Programming 16 03-26-2007 07:28 AM
Java, code compiles and supposedly runs fine in windows, but not linux exodist Programming 4 03-16-2004 12:47 PM
RedHat 9.0, Kernel 2.4.21, Linux-Wlan-Ng-0.2.1, Compiles and Runs. But Cant Connect. AndrewBalmos Linux - Wireless Networking 5 01-18-2004 06:18 PM


All times are GMT -5. The time now is 12:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration