Supercharge Your LAN With Condor, part 2
Submitting a Basic Condor Job
In the previous article of this 2-part series, you got your Condor client and server set up. Now let's test them out by submitting a job.
First, you'll need to set the CONDOR_CONFIG environment variable to the location of your condor_config file.
Next you have to create a Condor submit file. This tells Condor what your job is, how to run it, and what its requirements are. Here's a very basic example:
Executable = test.sh Log = test.log error = test.error Universe = vanilla Queue
This tells Condor to queue up one copy of test.sh for execution (a good test.sh for our purposes might be one that echos the date to a file, sleeps 5 seconds, and then echoes the date again to the same file). No platform is specified, so the default is to make it the same OS and architecture as the machine that the job was submitted from (so on the machine I'm writing this on, that would be i386 Linux). A log file is given, and somewhere to put stderror. No input or output commands are given, so stdin and stdout will both go to /dev/null.
Note that you should always provide a log file, so that Condor has somewhere to record the exit conditions of the job. It'll work fine without it, but you won't know what happened to the job.
This job is being run in the vanilla universe, since it uses a shell script -- see below for a discussion of universes.
To make your tests run a bit quicker (i.e. to avoid waiting for a machine to become free), you can set TESTINGMODE in the global config file. Find this line:
WANT_SUSPEND = $(UWCS_WANT_SUSPEND)
and replace it with
WANT_SUSPEND = $(TESTING_WANT_SUSPEND)
Repeat this with the other statements in this section (down to the line MaxJobRetirementTime) and restart Condor. Remember to change this all back when you go into production!
Now run condor_submit test (where test is the name of your submit file) and wait for it to run. Check your output file.