Clemson Home  >  CCIT HomeSkip NavigationA-Z Index    Calendar    CU Safety    Map    Webcams    Phonebook    

Basic Condor Functions in Windows XP

Getting Started

Condor is a command-line program. To open a command window, select Start -> Run, enter "cmd", click OK.  A command window will open.

Windows Start menuWindows Run dialog box

To add the Condor commands to your path, enter "set path=%path%;c:\condor\bin".

Setting the path

Then set up your Condor credential.

Setting the credential

The condor_status command lists the statuses of all machines in the pool.   Partial results are shown below:

condor_status command

 condor_status results

If the results scroll off the top of the window, you can redirect the output to a file.

condor_status results redirected 

Submitting and Monitoring Condor Jobs
The Class Ad

To submit a job using Condor, one first needs a class ad to give instructions, computing requirements, and possibly computing preferences. An execute machine is a computer in a Condor pool that is assigned to potentially run jobs. In addition to the requirements and preferences of the job being submitted through Condor, execute machines have their own requirements preferences for jobs they are willing to run. Hence, the term class ad comes from the familar idea of the classified advertisement, where buyer and seller advertise what they want to buy or sell and for what price. Below is a sample class ad. For more examples of class ads, click here. Below is a simple description of what the class ad means. For a more thorough reference, the reader is referred to the Condor Web site.

 Example Condor classad

The first parameter is Universe. Condor works in different such universes depending on the runtime environment needed. For more detail, the reader is referred to the Condor Web site. Most jobs that need to be run on Windows can use the vanilla universe.

For Executable, the user specifies the executable or script that the user wants to have run. In this example, "Requirements" specify the architecture and the operating system that the executable or script requires. Requirements can list other requirements. A user requiring a PC to have Cygwin installed can specify under Requirements HAS_CYGWIN==True.

The parameter should_transfer_files = YES says that input and output files should be transferred, and whenToTransferOutput = ON_EXIT says that the output should be returned to the computer from which the job was submitted when the jobs are finished running. These files will be transferred to the present working directory from which the condor_submit command was run.

Next, log, output, and error specify the respective names for the files that will contain the information generated by the executable or script to be run that was redirected from standard buffered error, standard input, and standard unbuffered error respectively. For this class ad, these will appear in the present working directory when the jobs are finished running unless the user specifies a path before the names. The symbol $(Process) translates to the process number (i.e. 0, 1, 2, ..., n-1, where n is the number of processes specified by the queue parameter).

If an executable or script requires different input files for different runs, the user may also specify

input = dataFile$(Process)

assuming that the user arranges beforehand to have the program take in a file called dataFile0, dataFile1, etc. To be clear, a name other than dataFile could be used, it just has to match that opened and read by the program being executed. Finally, queue specifies how many processes the user wants the job to run. In this example, condor should run Pi.exe 4 separate times on four different computers at the same time if the Condor pool is not too small. When queue is stated without an argument, it is equivalent to queue 1, so Condor has one run of the job performed by default.

Submitting a Job

Assuming that the path variable is set to include the path c:\condor\bin, place the class ad and the executable/script into a directory of the user's choice. In this example, I created a directory called CondorWork located in the C drive. Also, the class ad is called condor_classAd.txt. Submission of a job then begins with the command condor_submit followed by the file name of the class ad as shown below.

condor_submit command

If submission was successful, then one sees the following:

condor_submit results

Here are two ways to check the progress. The simplest way is to run condor_q to see the status of jobs in the queue.

condor_q results

A more detailed analysis can be obtained by using condor_q -analyze. This outputs a breakdown for each job of the machines in the pool that can or cannot take the job and the reason for not taking the job.

Finally, to remove jobs from the queue, use command condor_rm with appropriate argument (see below). For example, condor_rm -all removes all jobs in the user's queue.

condor_rm command

When the jobs finish running, the log, error, and output files should appear in the directory where condor_submit was entered unless otherwise specified in the class ad with, say, a relative path prefixed to the file names. In this example, the log, error, and output files will appear in the C:\CondorWork folder.



Maintained by CITI web services                    Copyright ©2008 Clemson University, Clemson, S.C. 29634, (864) 656-331