Running a single command on condor
runcommand.sh is a script for submitting a single line to be executed on the MSU tier 3 without having to mess around with condor files. This should be used for commands submitted one or two at a time. This should NOT be used to submit dozens or hundreds of jobs simultaneously. To submit many jobs at once, refer to the instructions at
MSUT3CondorExamples.
Using runcommand.sh
To use it just execute the runcommand.sh script with the line you want to run as the argument. The following example will run `echo 'Hello, world!'` in condor
Example:
/msu/data/t3work1/scripts/runcommand.sh echo 'Hello, world!'
When you run the script, there will be output text explaining how to check on your job's status and output.
Example output:
> /msu/data/t3work1/scripts/runcommand.sh echo 'Hello, world!'
Your job has been submitted. Details of your job can be found at
/msu/data/t3work7/tmp/kollElJL0mMPL/info.txt
The job output will be printed below:
---------------
Hello, world!
---------------
Reminder: Your job details are at
/msu/data/t3work7/tmp/kollElJL0mMPL/info.txt
Job 64047 has finished running.
Using an alias
You may want to include the following in your .bashrc
alias sub="/msu/data/t3work1/scripts/runcommand.sh"
Then you can use that alias as a shortcut to submit jobs. For example, the same 'Hello, world!' example as above can be submitted as shown below:
sub echo 'Hello, world!'
Troubleshooting
If you are doing something using characters that bash interprets, such as an I/O redirect, the script may get confused. To work around this, simply put the line into a file, for example /home/koll/myline.sh:
echo "Hello, world!" >/msu/data/t3work5/koll/output/myspecialoutput.txt
then run the following command:
/msu/data/t3work1/scripts/runcommand.sh source /home/koll/myline.sh
If your command depends on a complicated environment, such as Athena, it may fail. In this case you can add a setup line inside the script you made above:
Example myline.sh
asetup 18.0.0.0
echo "Hello, world!" >/msu/data/t3work5/koll/output/myspecialoutput.txt
and then you can execute the same as above
/msu/data/t3work1/scripts/runcommand.sh source /home/koll/myline.sh
--
JamesKoll - 14 Dec 2013