Condor User Tutorial Fermilab 27-Jan-2005
description
Transcript of Condor User Tutorial Fermilab 27-Jan-2005
![Page 1: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/1.jpg)
Condor ProjectComputer Sciences DepartmentUniversity of Wisconsin-Madison
[email protected]://www.cs.wisc.edu/condor
Condor User Tutorial
Fermilab27-Jan-2005
![Page 2: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/2.jpg)
2http://www.cs.wisc.edu/condor
Outline› Background and principals› User Tutorial: The Story of
Frieda, the scientist Using Condor to manage jobs Using DAGMan to manage
dependencies Condor-G Condor-C
![Page 3: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/3.jpg)
3http://www.cs.wisc.edu/condor
The Condor Project (Established ‘85)
Distributed High Throughput Computing research performed by a team of ~35 faculty, full time staff and students.
![Page 4: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/4.jpg)
4http://www.cs.wisc.edu/condor
The Condor Project (Established ‘85)Distributed High Throughput Computing research performed by a team of ~35 faculty, full time staff and students who:
face software engineering challenges in a distributed UNIX/Linux/NT environment
are involved in national and international grid collaborations,
actively interact with academic and commercial users, maintain and support large distributed production
environments, and educate and train students.
Funding – US Govt. (DoD, DoE, NASA, NSF, NIH),AT&T, IBM, INTEL, Microsoft, UW-Madison, …
![Page 5: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/5.jpg)
5http://www.cs.wisc.edu/condor
A Multifaceted Project › Harnessing the power of clusters - opportunistic and/or
dedicated (Condor)
› Job management services for Grid applications (Condor-G, Stork)
› Fabric management services for Grid resources (Condor, GlideIns, NeST)
› Distributed I/O technology (Parrot, Kangaroo, NeST)
› Job-flow management (DAGMan, Condor, Hawk)
› Distributed monitoring and management (HawkEye)
› Technology for Distributed Systems (ClassAD, MW)
› Packaging and Integration (NMI, VDT)
![Page 6: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/6.jpg)
6http://www.cs.wisc.edu/condor
Some software produced by the Condor Project
› Condor System› ClassAd Library
› DAGMan
› Fault Tolerant Shell
› Hawkeye
› GCB
› MW
› NeST
› Stork
› Parrot
› Condor-G
› Condor-G
› And others…
![Page 7: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/7.jpg)
7http://www.cs.wisc.edu/condor
What is Condor?› Condor converts collections of distributively
owned workstations and dedicated clusters into a distributed high-throughput computing (HTC) facility.
› Condor manages both resources (machines) and resource requests (jobs)
› Condor has several unique mechanisms such as : ClassAd Matchmaking Process checkpoint/ restart / migration Remote System Calls Grid Awareness
![Page 8: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/8.jpg)
8http://www.cs.wisc.edu/condor
Condor can manage a large number of jobs
› Managing a large number of jobs You specify the jobs in a file and submit
them to Condor, which runs them all and keeps you notified on their progress
Mechanisms to help you manage huge numbers of jobs (1000’s), all the data, etc.
Condor can handle inter-job dependencies (DAGMan)
Condor users can set job priorities Condor administrators can set user priorities
![Page 9: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/9.jpg)
9http://www.cs.wisc.edu/condor
Condor can manage Dedicated Resources…
› Dedicated Resources Compute Clusters
› Grid Resources› Manage
Node monitoring, scheduling
Job launch, monitor & cleanup
![Page 10: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/10.jpg)
10http://www.cs.wisc.edu/condor
…and Condor can manage non-dedicated
resources› Non-dedicated resources examples:
Desktop workstations in offices Workstations in student labs
› Non-dedicated resources are often idle --- ~70% of the time!
› Condor can effectively harness the otherwise wasted compute cycles from non-dedicated resources
![Page 11: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/11.jpg)
11http://www.cs.wisc.edu/condor
Meet Frieda.
She is a scientist.
But she has a big
problem.
![Page 12: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/12.jpg)
12http://www.cs.wisc.edu/condor
Frieda’s Application …Simulate the behavior of F(x,y,z) for 20 values of x, 10 values of y and 3 values of z (20*10*3 = 600 combinations) F takes on the average 3 hours to compute
on a “typical” workstation (total = 1800 hours)
F requires a “moderate” (128MB) amount of memory
F performs “moderate” I/O - (x,y,z) is 5 MB and F(x,y,z) is 50 MB
![Page 13: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/13.jpg)
13http://www.cs.wisc.edu/condor
I have 600simulations to run.
Where can I get help?
![Page 14: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/14.jpg)
14http://www.cs.wisc.edu/condor
Install a Personal Condor!
![Page 15: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/15.jpg)
15http://www.cs.wisc.edu/condor
Installing Condor› Download Condor for your operating
system
› Available as a free download fromhttp://www.cs.wisc.edu/condor
› Stable –vs- Developer Releases Naming scheme similar to the Linux Kernel…
› Available for most Unix platforms and Windows (2000 & XP)
![Page 16: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/16.jpg)
16http://www.cs.wisc.edu/condor
Or install from distributions
› Install from NMI: http://www.nsf-middleware.org Condor-G only
› Install from VDT: http://www.cs.wisc.edu/vdt
› Install from ROCKS: http://www.rocksclusters.org/Rocks/
› Condor can be installed on your own workstation, no root access required, no system administrator intervention needed
![Page 17: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/17.jpg)
17http://www.cs.wisc.edu/condor
So Frieda Installs Personal Condor on her
machine…› What do we mean by a “Personal”
Condor? Condor on your own workstation, no
root access required, no system administrator intervention needed
› After installation, Frieda submits her jobs to her Personal Condor…
![Page 18: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/18.jpg)
18http://www.cs.wisc.edu/condor
yourworkstation
personalCondor
600 Condorjobs
![Page 19: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/19.jpg)
19http://www.cs.wisc.edu/condor
Personal Condor?!
What’s the benefit of a Condor “Pool” with just
one user and one machine?
![Page 20: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/20.jpg)
20http://www.cs.wisc.edu/condor
Your Personal Condor will ...
› … keep an eye on your jobs and will keep you posted on their progress
› … implement your policy on the execution order of the jobs
› … keep a log of your job activities› … add fault tolerance to your jobs› … implement your policy on when the
jobs can run on your workstation› … make a nice demo Condor installation
for a hands-on tutorial
![Page 21: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/21.jpg)
21http://www.cs.wisc.edu/condor
Getting Started: Submitting Jobs to
Condor› Choosing a “Universe” for your job
Just use VANILLA for now
› Make your job “batch-ready”
› Creating a submit description file
› Run condor_submit on your submit description file
![Page 22: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/22.jpg)
22http://www.cs.wisc.edu/condor
Making your job ready› Must be able to run in the
background: no interactive input, windows, GUI, etc.
› Can still use STDIN, STDOUT, and STDERR (the keyboard and the screen), but files are used for these instead of the actual devices
› Organize data files
![Page 23: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/23.jpg)
23http://www.cs.wisc.edu/condor
Creating a Submit Description File
› A plain ASCII text file
› Tells Condor about your job: Which executable, universe, input, output and
error files to use, command-line arguments, environment variables, any special requirements or preferences (more on this later)
› Can describe many jobs at once (a “cluster”) each with different input, arguments, output, etc.
![Page 24: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/24.jpg)
24http://www.cs.wisc.edu/condor
Simple Submit Description File
# Simple condor_submit input file# (Lines beginning with # are comments)# NOTE: the words on the left side are not# case sensitive, but filenames are!Universe = vanillaExecutable = my_jobQueue
![Page 25: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/25.jpg)
25http://www.cs.wisc.edu/condor
Running condor_submit
› You give condor_submit the name of the submit file you have created
› condor_submit parses the file, checks for errors, and creates a “ClassAd” that describes your job(s)
› Sends your job’s ClassAd(s) and executable to the condor_schedd, which stores the job in its queue Atomic operation, two-phase commit
› View the queue with condor_q
![Page 26: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/26.jpg)
26http://www.cs.wisc.edu/condor
Running condor_submit
% condor_submit my_job.submit-fileSubmitting job(s).1 job(s) submitted to cluster 1.
% condor_q
-- Submitter: perdita.cs.wisc.edu : <128.105.165.34:1027> : ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD
1.0 frieda 6/16 06:52 0+00:00:00 I 0 0.0 my_job
1 jobs; 1 idle, 0 running, 0 held
%
![Page 27: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/27.jpg)
27http://www.cs.wisc.edu/condor
Another Submit Description File
# Example condor_submit input file# (Lines beginning with # are comments)# NOTE: the words on the left side are not# case sensitive, but filenames are!Universe = vanillaExecutable = /home/wright/condor/my_job.condorInput = my_job.stdinOutput = my_job.stdoutError = my_job.stderrArguments = -arg1 -arg2InitialDir = /home/wright/condor/run_1Queue
![Page 28: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/28.jpg)
28http://www.cs.wisc.edu/condor
“Clusters” and “Processes”
› If your submit file describes multiple jobs, we call this a “cluster”
› Each job within a cluster is called a “process” or “proc”
› If you only specify one job, you still get a cluster, but it has only one process
› A Condor “Job ID” is the cluster number, a period, and the process number (“23.5”)
› Process numbers always start at 0
![Page 29: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/29.jpg)
29http://www.cs.wisc.edu/condor
Example Submit Description File for a
Cluster# Example condor_submit input file that defines# a cluster of two jobs with different iwdUniverse = vanillaExecutable = my_jobArguments = -arg1 -arg2
InitialDir = run_0 Queue Becomes job 2.0
InitialDir = run_1
Queue Becomes job 2.1
![Page 30: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/30.jpg)
30http://www.cs.wisc.edu/condor
% condor_submit my_job.submit-file
Submitting job(s).
2 job(s) submitted to cluster 2.
% condor_q
-- Submitter: perdita.cs.wisc.edu : <128.105.165.34:1027> :
ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD
1.0 frieda 6/16 06:52 0+00:02:11 R 0 0.0 my_job
2.0 frieda 6/16 06:56 0+00:00:00 I 0 0.0 my_job
2.1 frieda 6/16 06:56 0+00:00:00 I 0 0.0 my_job
3 jobs; 2 idle, 1 running, 0 held
%
![Page 31: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/31.jpg)
31http://www.cs.wisc.edu/condor
Submit Description File for a BIG Cluster of Jobs
› The initial directory for each job is specified with the $(Process) macro, and instead of submitting a single job, we use “Queue 600” to submit 600 jobs at once
› $(Process) will be expanded to the process number for each job in the cluster (from 0 up to 599 in this case), so we’ll have “run_0”, “run_1”, … “run_599” directories
› All the input/output files will be in different directories!
![Page 32: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/32.jpg)
32http://www.cs.wisc.edu/condor
Submit Description File for a BIG Cluster of Jobs
# Example condor_submit input file that defines# a cluster of 600 jobs with different iwdUniverse = vanillaExecutable = my_jobArguments = -arg1 –arg2InitialDir = run_$(Process)Queue 600
![Page 33: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/33.jpg)
33http://www.cs.wisc.edu/condor
Using condor_rm
› If you want to remove a job from the Condor queue, you use condor_rm
› You can only remove jobs that you own (you can’t run condor_rm on someone else’s jobs unless you are root)
› You can give specific job ID’s (cluster or cluster.proc), or you can remove all of your jobs with the “-a” option.
![Page 34: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/34.jpg)
34http://www.cs.wisc.edu/condor
Temporarily halt a Job› Use condor_hold to place a job on
hold Kills job if currently running Will not attempt to restart job until
released
› Use condor_release to remove a hold and permit job to be scheduled again
![Page 35: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/35.jpg)
35http://www.cs.wisc.edu/condor
Using condor_history
› Once your job completes, it will no longer show up in condor_q
› You can use condor_history to view information about a completed job
› The status field (“ST”) will have either a “C” for “completed”, or an “X” if the job was removed with condor_rm
![Page 36: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/36.jpg)
36http://www.cs.wisc.edu/condor
Getting Email from Condor
› By default, Condor will send you email when your jobs completes With lots of information about the run
› If you don’t want this email, put this in your submit file:
notification = never
› If you want email every time something happens to your job (preempt, exit, etc), use this:
notification = always
![Page 37: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/37.jpg)
37http://www.cs.wisc.edu/condor
Getting Email from Condor (cont’d)
› If you only want email in case of errors, use this:
notification = error
› By default, the email is sent to your account on the host you submitted from. If you want the email to go to a different address, use this:
notify_user = [email protected]
![Page 38: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/38.jpg)
38http://www.cs.wisc.edu/condor
A Job’s life story: The “User Log” file
› A UserLog should be specified in your submit file:Log = filename
› You get a log entry for everything that happens to your job: When it was submitted, when it starts
executing, preempted, restarted, completes, if there are any problems, etc.
› Very useful! Highly recommended!
![Page 39: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/39.jpg)
39http://www.cs.wisc.edu/condor
Sample Condor User Log
000 (8135.000.000) 05/25 19:10:03 Job submitted from host: <128.105.146.14:1816>
...
001 (8135.000.000) 05/25 19:12:17 Job executing on host: <128.105.165.131:1026>
...
005 (8135.000.000) 05/25 19:13:06 Job terminated.
(1) Normal termination (return value 0)
Usr 0 00:00:37, Sys 0 00:00:00 - Run Remote Usage
Usr 0 00:00:00, Sys 0 00:00:05 - Run Local Usage
Usr 0 00:00:37, Sys 0 00:00:00 - Total Remote Usage
Usr 0 00:00:00, Sys 0 00:00:05 - Total Local Usage
9624 - Run Bytes Sent By Job
7146159 - Run Bytes Received By Job
9624 - Total Bytes Sent By Job
7146159 - Total Bytes Received By Job
...
![Page 40: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/40.jpg)
40http://www.cs.wisc.edu/condor
Job Priorities w/ condor_prio
› condor_prio allows you to specify the order in which your jobs are started
› Higher the prio #, the earlier the job will start% condor_q
-- Submitter: perdita.cs.wisc.edu : <128.105.165.34:1027> :
ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD
1.0 frieda 6/16 06:52 0+00:02:11 R 0 0.0 my_job
% condor_prio +5 1.0
% condor_q
-- Submitter: perdita.cs.wisc.edu : <128.105.165.34:1027> :
ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD
1.0 frieda 6/16 06:52 0+00:02:13 R 5 0.0 my_job
![Page 41: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/41.jpg)
41http://www.cs.wisc.edu/condor
The Scheduler Universe
› In addition to VANILLA, another job universe is the Scheduler Universe.
› Scheduler Universe jobs run on the submitting machine and can serve as a meta-scheduler.
› DAGMan meta-scheduler included
![Page 42: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/42.jpg)
42http://www.cs.wisc.edu/condor
DAGMan
› Directed Acyclic Graph Manager
› DAGMan allows you to specify the dependencies between your Condor jobs, so it can manage them automatically for you.
› (e.g., “Don’t run job “B” until job “A” has completed successfully.”)
![Page 43: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/43.jpg)
43http://www.cs.wisc.edu/condor
What is a DAG?
› A DAG is the data structure used by DAGMan to represent these dependencies.
› Each job is a “node” in the DAG.
› Each node can have any number of “parent” or “children” nodes – as long as there are no loops!
Job A
Job B Job C
Job D
![Page 44: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/44.jpg)
44http://www.cs.wisc.edu/condor
› A DAG is defined by a .dag file, listing each of its nodes and their dependencies:# diamond.dagJob A a.subJob B b.subJob C c.subJob D d.subParent A Child B CParent B C Child D
› each node will run the Condor job specified by its accompanying Condor submit file
Defining a DAG
Job A
Job B Job C
Job D
![Page 45: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/45.jpg)
45http://www.cs.wisc.edu/condor
Submitting a DAG
› To start your DAG, just run condor_submit_dag with your .dag file, and Condor will start a personal DAGMan daemon which to begin running your jobs:
% condor_submit_dag diamond.dag
› condor_submit_dag submits a Scheduler Universe Job with DAGMan as the executable.
› Thus the DAGMan daemon itself runs as a Condor job, so you don’t have to baby-sit it.
![Page 46: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/46.jpg)
46http://www.cs.wisc.edu/condor
DAGMan
Running a DAG
› DAGMan acts as a “meta-scheduler”, managing the submission of your jobs to Condor based on the DAG dependencies.
CondorJobQueue
C
D
A
A
B.dagFile
![Page 47: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/47.jpg)
47http://www.cs.wisc.edu/condor
DAGMan
Running a DAG (cont’d)
› DAGMan holds & submits jobs to the Condor queue at the appropriate times.
CondorJobQueue
C
D
B
C
B
A
![Page 48: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/48.jpg)
48http://www.cs.wisc.edu/condor
DAGMan
Running a DAG (cont’d)
› In case of a job failure, DAGMan continues until it can no longer make progress, and then creates a “rescue” file with the current state of the DAG.
CondorJobQueue
X
D
A
BRescue
File
![Page 49: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/49.jpg)
49http://www.cs.wisc.edu/condor
DAGMan
Recovering a DAG
› Once the failed job is ready to be re-run, the rescue file can be used to restore the prior state of the DAG.
CondorJobQueue
C
D
A
BRescue
File
C
![Page 50: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/50.jpg)
50http://www.cs.wisc.edu/condor
DAGMan
Recovering a DAG (cont’d)
› Once that job completes, DAGMan will continue the DAG as if the failure never happened.
CondorJobQueue
C
D
A
B
D
![Page 51: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/51.jpg)
51http://www.cs.wisc.edu/condor
DAGMan
Finishing a DAG
› Once the DAG is complete, the DAGMan job itself is finished, and exits.
CondorJobQueue
C
D
A
B
![Page 52: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/52.jpg)
52http://www.cs.wisc.edu/condor
Additional DAGMan Features
› Provides other handy features for job management…
nodes can have PRE & POST scripts failed nodes can be automatically re-
tried a configurable number of times job submission can be “throttled”
![Page 53: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/53.jpg)
53http://www.cs.wisc.edu/condor
And Even Bigger:744 Files, 387 Nodes
108
168
60
50
Argonne National Laboratory
![Page 54: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/54.jpg)
54http://www.cs.wisc.edu/condor
We’ve seen how Condor will
… keep an eye on your jobs and will keep you posted on their progress
… implement your policy on the execution order of the jobs
… keep a log of your job activities… add fault tolerance to your jobs ?
![Page 55: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/55.jpg)
55http://www.cs.wisc.edu/condor
What if each job needed to run for
20 days?
What if I wanted to interrupt a job with
a higher priority job?
![Page 56: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/56.jpg)
56http://www.cs.wisc.edu/condor
Condor’s Standard Universe to the rescue!
› Condor can support various combinations of features/environments in different “Universes”
› Different Universes provide different functionality for your job: Vanilla – Run any Serial Job Scheduler – Plug in a meta-scheduler Standard – Support for transparent
process checkpoint and restart
![Page 57: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/57.jpg)
57http://www.cs.wisc.edu/condor
Process Checkpointing› Condor’s Process Checkpointing
mechanism saves all the state of a process into a checkpoint file Memory, CPU, I/O, etc.
› The process can then be restarted from right where it left off
› Typically no changes to your job’s source code needed – however, your job must be relinked with Condor’s Standard Universe support library
![Page 58: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/58.jpg)
58http://www.cs.wisc.edu/condor
Relinking Your Job for submission to the Standard Universe
To do this, just place “condor_compile” in front of the command you normally use to link your job:condor_compile gcc -o myjob myjob.c
OR
condor_compile f77 -o myjob filea.f fileb.f
OR
condor_compile make –f MyMakefile
![Page 59: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/59.jpg)
59http://www.cs.wisc.edu/condor
Limitations in the Standard Universe
› Condor’s checkpointing is not at the kernel level. Thus in the Standard Universe the job may not fork() Use kernel threads Use some forms of IPC, such as pipes
and shared memory
› Many typical scientific jobs are OK
![Page 60: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/60.jpg)
60http://www.cs.wisc.edu/condor
When will Condor checkpoint your job?
› Periodically, if desired For fault tolerance
› To free the machine to do a higher priority task (higher priority job, or a job from a user with higher priority) Preemptive-resume scheduling
› When you explicitly run condor_checkpoint, condor_vacate, condor_off or condor_restart command
![Page 61: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/61.jpg)
61http://www.cs.wisc.edu/condor
What Condor Daemons are
running on my machine, and what
do they do?
![Page 62: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/62.jpg)
62http://www.cs.wisc.edu/condor
Condor Daemon Layout
Personal Condor / Central Manager
master
collector
negotiator
schedd
startd
= Process Spawned
![Page 63: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/63.jpg)
63http://www.cs.wisc.edu/condor
condor_master› Starts up all other Condor
daemons› If there are any problems and a
daemon exits, it restarts the daemon and sends email to the administrator
› Checks the time stamps on the binaries of the other Condor daemons, and if new binaries appear, the master will gracefully shutdown the currently running version and start the new version
master
![Page 64: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/64.jpg)
64http://www.cs.wisc.edu/condor
condor_startd› Represents a machine to
the Condor system
› Responsible for starting, suspending, and stopping jobs
› Enforces the wishes of the machine owner (the owner’s “policy”… more on this soon)
master
startd
![Page 65: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/65.jpg)
65http://www.cs.wisc.edu/condor
condor_schedd› Represents users to the
Condor system› Maintains the persistent
queue of jobs› Responsible for contacting
available machines and sending them jobs
› Services user commands which manipulate the job queue: condor_submit,condor_rm,
condor_q, condor_hold, condor_release, condor_prio, …
master
schedd
startd
![Page 66: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/66.jpg)
66http://www.cs.wisc.edu/condor
condor_collector
› Collects information from all other Condor daemons in the pool “Directory Service” / Database for a Condor pool
› Each daemon sends a periodic update called a “ClassAd” to the collector
› Services queries for information: Queries from other Condor daemons Queries from users (condor_status)
scheddcollector
master
startd
![Page 67: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/67.jpg)
67http://www.cs.wisc.edu/condor
condor_negotiator
› Performs “matchmaking” in Condor› Gets information from the collector about all
available machines and all idle jobs› Tries to match jobs with machines that will serve
them › Both the job and the machine must satisfy each
other’s requirements
master
collector
negotiator
schedd
startd
![Page 68: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/68.jpg)
68http://www.cs.wisc.edu/condor
Happy Day! Frieda’s organization purchased
a Beowulf Cluster!› Frieda installs Condor on
all the dedicated Cluster nodes, and configures them with her machine as the central manager…
› Now her Condor Pool can run multiple jobs at once
![Page 69: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/69.jpg)
69http://www.cs.wisc.edu/condor
yourworkstation
personalCondor
600 Condorjobs
Condor Pool
![Page 70: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/70.jpg)
70http://www.cs.wisc.edu/condor
Layout of the Condor PoolCentral Manager (Frieda’s)
master
collector
negotiator
schedd
startd
= ClassAd Communication Pathway
= Process Spawned Cluster Node
master
startd
Cluster Node
master
startd
![Page 71: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/71.jpg)
71http://www.cs.wisc.edu/condor
condor_status% condor_status
Name OpSys Arch State Activity LoadAv Mem ActvtyTime
haha.cs.wisc. IRIX65 SGI Unclaimed Idle 0.198 192 0+00:00:04
antipholus.cs LINUX INTEL Unclaimed Idle 0.020 511 0+02:28:42
coral.cs.wisc LINUX INTEL Claimed Busy 0.990 511 0+01:27:21
doc.cs.wisc.e LINUX INTEL Unclaimed Idle 0.260 511 0+00:20:04
dsonokwa.cs.w LINUX INTEL Claimed Busy 0.810 511 0+00:01:45
ferdinand.cs. LINUX INTEL Claimed Suspended 1.130 511 0+00:00:55
vm1@pinguino. LINUX INTEL Unclaimed Idle 0.000 255 0+01:03:28
vm2@pinguino. LINUX INTEL Unclaimed Idle 0.190 255 0+01:03:29
![Page 72: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/72.jpg)
72http://www.cs.wisc.edu/condor
Frieda tries out ‘static’ parallel jobs: MPI
Universe› Schedule and start an MPICH job on
dedicated resources
## MPI example submit description fileuniverse = MPIexecutable = simplempilog = logfileinput = infile.$(NODE)output = outfile.$(NODE)error = errfile.$(NODE)machine_count = 4queue
![Page 73: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/73.jpg)
73http://www.cs.wisc.edu/condor
The Boss says Frieda can add her
co-workers’ desktop machines
into her Condor pool as well…
but only if they can also submit jobs.
(Boss Fat Cat)
![Page 74: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/74.jpg)
74http://www.cs.wisc.edu/condor
Layout of the Condor PoolCentral Manager (Frieda’s)
master
collector
negotiator
schedd
startd
= ClassAd Communication Pathway
= Process Spawned
Desktop
schedd
startd
master
Desktop
schedd
startd
master
Cluster Node
master
startd
Cluster Node
master
startd
![Page 75: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/75.jpg)
75http://www.cs.wisc.edu/condor
Some of the machines in the Pool do not have
enough memory or scratch disk space
to run my job!
![Page 76: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/76.jpg)
76http://www.cs.wisc.edu/condor
Specify Requirements!› An expression (syntax similar to C or Java)› Must evaluate to True for a match to be made
Universe = vanillaExecutable = my_jobInitialDir = run_$(Process)Requirements = Memory >= 256 && Disk > 10000Queue 600
![Page 77: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/77.jpg)
77http://www.cs.wisc.edu/condor
Specify Rank!› All matches which meet the requirements can
be sorted by preference with a Rank expression. › Higher the Rank, the better the match
Universe = vanillaExecutable = my_jobArguments = -arg1 –arg2InitialDir = run_$(Process)Requirements = Memory >= 256 && Disk > 10000Rank = (KFLOPS*10000) + MemoryQueue 600
![Page 78: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/78.jpg)
78http://www.cs.wisc.edu/condor
What attributes can I reference in
Requirements/Rank ?› Answer: Any attributes that appear in the
machine or job classad› Out of the box, Condor has ~70 attributes per
machine classad and ~70 attributes per job classad
› Sites can add their own custom attributes to machine or job classads
› To see all ad attributes: condor_status –long (for machine classads) condor_q –long (for job classads)
![Page 79: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/79.jpg)
79http://www.cs.wisc.edu/condor
Condor ClassAds
› ClassAds are at the heart of Condor
› ClassAds are a set of uniquely named
expressions; each expression is called an attribute
combine query and data semi-structured : no fixed schema extensible
![Page 80: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/80.jpg)
80http://www.cs.wisc.edu/condor
Sample ClassAdMyType = "Machine"TargetType = "Job"Machine = "froth.cs.wisc.edu"Arch = "INTEL"OpSys = "SOLARIS251"Disk = 35882Memory = 128KeyboardIdle = 173LoadAvg = 0.1000Requirements = TARGET.Owner=="smith" || LoadAvg<=0.3 && KeyboardIdle>15*60
![Page 81: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/81.jpg)
81http://www.cs.wisc.edu/condor
ClassAd Matching
› Two ClassAds are said to “match” if the Requirements expression from both ads evaluates to True when evaluated within the context of each other.
› The Rank expression is the “goodness” of the match (higher is better).
![Page 82: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/82.jpg)
82http://www.cs.wisc.edu/condor
How can my jobs access their data
files?
![Page 83: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/83.jpg)
83http://www.cs.wisc.edu/condor
Access to Data in Condor
› Can use shared filesystem if available
› No shared filesystem? Remote System Calls (in the Standard
Universe) Condor File Transfer Service
• Can automatically send back changed files• Atomic transfer of multiple files
![Page 84: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/84.jpg)
84http://www.cs.wisc.edu/condor
Standard Universe Remote System Calls
› I/O System calls trapped and sent back to submit machine
› Allows Transparent Migration Across Administrative Domains Checkpoint on machine A, restart on B
› No Source Code changes required› Language Independent› Opportunities
For Application Steering• Example: Condor tells customer process “how” to open files
For compression on the fly More…
![Page 85: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/85.jpg)
85http://www.cs.wisc.edu/condor
Customer Job
Job Startup
Submit
Schedd
Shadow
Startd
Starter
CondorSyscall Lib
![Page 86: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/86.jpg)
86http://www.cs.wisc.edu/condor
Condor File Transfer› Set Should_Transfer_Files
YES : Always transfer files to execution site NO : Rely on a shared filesystem IF_NEEDED : will automatically transfer the files if the submit
and execute machine are not in the same FileSystemDomain
› Set When_To_Transfer_Output ON_EXIT or ON_EXIT_OR_VACATE
Universe = vanillaExecutable = my_jobRequirements = Memory >= 256 && Disk > 10000Should_Transfer_Files = IF_NEEDEDWhen_To_Transfer_Output = IF_NEEDEDTransfer_input_files = dataset$(Process), common.dataQueue 600
![Page 87: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/87.jpg)
87http://www.cs.wisc.edu/condor
I am adding nodes to the Cluster… but
the Engineering Department has priority on these
nodes.
(Boss Fat Cat)
Policy Configuration
![Page 88: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/88.jpg)
88http://www.cs.wisc.edu/condor
Machine Policy coming this afternoon…Ooohhhh… the
suspense!
![Page 89: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/89.jpg)
89http://www.cs.wisc.edu/condor
The Cluster is fine. But not the
desktop machines. Condor can only use the desktops when they would otherwise be idle.
(Boss Fat Cat)
Policy Configuration, cont
![Page 90: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/90.jpg)
90http://www.cs.wisc.edu/condor
Machine Policy coming this afternoon…Ooohhhh… the
suspense!
![Page 91: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/91.jpg)
91http://www.cs.wisc.edu/condor
I want to use Java.Is there any easyway to run Java programs via
Condor?
![Page 92: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/92.jpg)
92http://www.cs.wisc.edu/condor
Java Universe Jobuniverse = javaexecutable = Main.classjar_files = MyLibrary.jarinput = infileoutput = outfilearguments = Main 1 2 3queue
condor_submit
![Page 93: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/93.jpg)
93http://www.cs.wisc.edu/condor
Why not use Vanilla Universe for Java jobs?
› Java Universe provides more than just inserting “java” at the start of the execute line Knows which machines have a JVM installed Knows the location, version, and
performance of JVM on each machine Provides more information about Java job
completion than just JVM exit code• Program runs in a Java wrapper, allowing Condor
to report Java exceptions, etc.
![Page 94: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/94.jpg)
94http://www.cs.wisc.edu/condor
General User Commands› condor_status View Pool Status
› condor_q View Job Queue› condor_submit Submit new Jobs› condor_rm Remove Jobs› condor_history Completed Job Info› condor_submit_dag Specify
Dependencies› condor_checkpoint Force a checkpoint› condor_compile Link Condor library
![Page 95: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/95.jpg)
95http://www.cs.wisc.edu/condor
CondorView Usage Graph
![Page 96: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/96.jpg)
96http://www.cs.wisc.edu/condor
Job Submit files: Built-in and Defined
Macros› Macros are resolved by condor_submit before creating the Job ClassAd.
› We’ve seen the $(Process) built-in macro. There are others: $(Cluster) $ENV(foo) $RANDOM_CHOICE(x,y,z,…) $(Dollar)
› User Defined macros can be defined anytime in the submit file with the syntax
<macro_name> = <string> and then used with the form $(macro_name).
![Page 97: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/97.jpg)
97http://www.cs.wisc.edu/condor
Job Submit File Example
# Run foo –mem 512 –seed [0|1|2] –dir <directory>
#Universe = vanillaExecutable = fooMemory = 512Requirements = Memory > $(Memory)Arguments = -mem $(Memory) \ -seed $RANDOM_CHOICE(0,1,2) -dir $ENV(HOME)output = log.$(cluster).$(process)Queue 100
![Page 98: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/98.jpg)
98http://www.cs.wisc.edu/condor
Job submit files: Match Ad Substitution
macros› A substitution macro takes the value of
the expression from the resource (machine ClassAd) after a match has been made. These macros look like: $$(attribute)
› An alternate form looks like:$$(attribute:string_if_attribute_undefined)
![Page 99: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/99.jpg)
99http://www.cs.wisc.edu/condor
Example Submit File
# Run on Solaris or LinuxUniverse = vanillaRequirements = Opsys==“Linux” ||
Opsys == “Solaris”Executable = foo.$$(opsys)Arguments = -textures
$$(texturedir:/usr/local/alias/textures)queue
![Page 100: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/100.jpg)
100http://www.cs.wisc.edu/condor
Submit File:Job Failure Policy
Expressions› You can supply job failure policy expressions in the submit file.
› Can be used to describe a successful run, or what to do in the face of failure.
on_exit_remove = <expression>on_exit_hold = <expression>periodic_remove = <expression>periodic_hold = <expression>periodic_release = <expression>
![Page 101: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/101.jpg)
101http://www.cs.wisc.edu/condor
Job Failure Policy Examples› Do not remove from queue (i.e. reschedule) if
exits with a signal:on_exit_remove = ExitBySignal == False
› Place on hold if exits with nonzero status or ran for less than an hour:
on_exit_hold = ((ExitBySignal==False) && (ExitSignal != 0)) || ((CurrentTime –
JobStartDate) < 3600)› Place on hold if job has spent more than 50% of
its time suspended:periodic_hold = CumulativeSuspensionTime
> (RemoteWallClockTime / 2.0)
![Page 102: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/102.jpg)
102http://www.cs.wisc.edu/condor
Submit file: Job Environment
› Environment = var=val; var1=val1; …› Getenv = [True | False] Defaults to be
false. Often GetEnv=TRUE fixes problems due to an
empty environment, BUT Be wary – the submit machine’s environment
may not make sense on the execute machine! Note: job will always be started with a
CONDOR_SCRATCH_DIR environment variable to a subdir that is removed when the job leaves.
![Page 103: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/103.jpg)
104http://www.cs.wisc.edu/condor
What happens if the workstation running
the Central Manager crashes?
![Page 104: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/104.jpg)
105http://www.cs.wisc.edu/condor
What happens if the workstation running
my job (execute machine) crashes?
![Page 105: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/105.jpg)
106http://www.cs.wisc.edu/condor
What happens if the workstation running my schedd (submit machine) crashes?
![Page 106: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/106.jpg)
107http://www.cs.wisc.edu/condor
Disconnected Shadow/Starter
› Once upon a time, only one answer: job restarts.› Now for Vanilla and Java universe jobs, Condor
now supports reestablishing the connection between the submitting and executing machines.
› To take advantage of this feature, the user must put the following line into their job’s submit description file:
+JobLeaseDuration = <N seconds>For example: +JobLeaseDuration = 1200
![Page 107: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/107.jpg)
108http://www.cs.wisc.edu/condor
Why is my job not running?
![Page 108: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/108.jpg)
109http://www.cs.wisc.edu/condor
Troubleshooting “stuck” jobs
› Try condor_q –analyze
• Check ClassAd requirements Maybe user priority? Check job log or ShadowLog – maybe
job is starting and failing right away.
![Page 109: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/109.jpg)
110http://www.cs.wisc.edu/condor
Back to the Story…
Frieda Needs Remote Resources…
![Page 110: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/110.jpg)
111http://www.cs.wisc.edu/condor
Frieda Builds a Grid!
› First Frieda takes advantage of her Condor friends!
› She knows people with their own Condor pools, and gets permission to access their resources
› She then configures her Condor pool to “flockflock” to these pools
![Page 111: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/111.jpg)
112http://www.cs.wisc.edu/condor
yourworkstation
Friendly Condor Pool
personalCondor
600 Condorjobs
Condor Pool
![Page 112: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/112.jpg)
113http://www.cs.wisc.edu/condor
How Flocking Works› Add a line to your condor_config :
FLOCK_HOSTS = Pool-Foo, Pool-Bar
ScheddSchedd
CollectorCollector
NegotiatorNegotiator
Central Manager
(CONDOR_HOST)
CollectorCollector
NegotiatorNegotiator
Pool-Foo Central Manager
CollectorCollector
NegotiatorNegotiator
Pool-BarCentral Manager
SubmitMachine
![Page 113: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/113.jpg)
114http://www.cs.wisc.edu/condor
Condor Flocking› Remote pools are contacted in the order
specified until jobs are satisfied
› The list of remote pools is a property of the Schedd, not the Central Manager So different users can Flock to different
pools And remote pools can allow specific users
› User-priority system is “flocking-aware” A pool’s local users can have priority over
remote users “flocking” in.
![Page 114: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/114.jpg)
115http://www.cs.wisc.edu/condor
Condor Flocking, cont.› Flocking is “Condor” specific technology…› Frieda also has access to Globus resources
she wants to use She has certificates and access to Globus
gatekeepers at remote institutions
› But Frieda wants Condor’s queue management features for her Globus jobs!
› She installs Condor-G so she can submit “Globus Universe” jobs to Condor
![Page 115: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/115.jpg)
116http://www.cs.wisc.edu/condor
Condor-G: Access non-Condor Grid resources
Globus
› middleware deployed across entire Grid
› remote access to computational resources
› dependable, robust data transfer
Condor› job scheduling across
multiple resources
› strong fault tolerance with checkpointing and migration
› layered over Globus as “personal batch system” for the Grid
![Page 116: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/116.jpg)
117http://www.cs.wisc.edu/condor
Frieda Submits a Globus Universe Job
› In her submit description file, she specifies: Universe = Globus Which Globus Gatekeeper to use Optional: Location of file containing your
Globus certificateuniverse = globusglobusscheduler = beak.cs.wisc.edu/jobmanagerexecutable = prognamequeue
![Page 117: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/117.jpg)
123http://www.cs.wisc.edu/condor
Globus Universe Concerns
› What about Fault Tolerance? Local Crashes
• What if the submit machine goes down? Network Outages
• What if the connection to the remote Globus jobmanager is lost?
Remote Crashes• What if the remote Globus jobmanager
crashes?• What if the remote machine goes down?
![Page 118: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/118.jpg)
124http://www.cs.wisc.edu/condor
Globus Universe Fault-Tolerance: Submit-side
Failures› All relevant state for each submitted job
is stored persistently in the Condor job queue.
› This persistent information allows the Condor GridManager upon restart to read the state information and reconnect to JobManagers that were running at the time of the crash.
› If a JobManager fails to respond…
![Page 119: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/119.jpg)
125http://www.cs.wisc.edu/condor
Globus Universe Fault-Tolerance:Lost Contact with Remote
JobmanagerCan we contact gatekeeper?
Yes – network was downNo – machine crashed
or job completed
Yes - jobmanager crashed No – retry until we can talk to gatekeeper again…
Can we reconnect to jobmanager?
Has job completed?
No – is job still running?
Yes – update queue
Restart jobmanager
![Page 120: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/120.jpg)
126http://www.cs.wisc.edu/condor
Globus Universe Fault-Tolerance: Credential
Management› Authentication in Globus is done
with limited-lifetime X509 proxies› Proxy may expire before jobs finish
executing› Condor can put jobs on hold and
email user to refresh proxy› Can interface with MyProxy…
![Page 121: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/121.jpg)
127http://www.cs.wisc.edu/condor
But Frieda Wants More…
› She wants to run standard universe jobs on Globus-managed resources For matchmaking and dynamic
scheduling of jobs For job checkpointing and migration For remote system calls
![Page 122: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/122.jpg)
128http://www.cs.wisc.edu/condor
One Solution: Condor-G GlideIn
› Frieda can use the Globus Universe to run Condor daemons on Globus resources
› When the resources run these GlideIn jobs, they will temporarily join her Condor Pool
› She can then submit Standard, Vanilla, PVM, or MPI Universe jobs and they will be matched and run on the Globus resources
![Page 123: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/123.jpg)
129http://www.cs.wisc.edu/condor
yourworkstation
Friendly Condor Pool
personalCondor
600 Condorjobs
Globus Grid
PBS LSF
Condor
Condor Pool
glide-in jobs
![Page 124: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/124.jpg)
130http://www.cs.wisc.edu/condor
yourworkstation
Remote Condor Pool
personalCondor
600 Condorjobs
Globus Grid
PBS LSF
Condor
Local Condor Pool
glide-in jobs
![Page 125: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/125.jpg)
131http://www.cs.wisc.edu/condor
GlideIn Concerns
› What if a Globus resource kills my GlideIn job? That resource will disappear from your pool and your
jobs will be rescheduled on other machines Standard universe jobs will resume from their last
checkpoint like usual
› What if all my jobs are completed before a GlideIn job runs? If a GlideIn Condor daemon is not matched with a job
in 10 minutes, it terminates, freeing the resource
![Page 126: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/126.jpg)
132http://www.cs.wisc.edu/condor
The Route to Condor-C: Condor
schedd(Job caretaker)
condor_submit
matchmaker
Startd(Runs job)
![Page 127: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/127.jpg)
133http://www.cs.wisc.edu/condor
The Route to Condor-C: Condor-G
schedd(Job caretaker)
condor_submit
gridmanager gahp
Globus gatekeeper
![Page 128: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/128.jpg)
134http://www.cs.wisc.edu/condor
Condor-C
schedd(Job caretaker)
condor_submit
gridmanager condor-gahp
schedd
matchmaker
startd
![Page 129: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/129.jpg)
135http://www.cs.wisc.edu/condor
Condor-C to non-Condor
schedd(Job caretaker)
condor_submit
gridmanager condor-gahp
schedd
gridmanager
pbs/lsf-gahp PBS or LSF
![Page 130: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/130.jpg)
136http://www.cs.wisc.edu/condor
Gliding in Condor-C
schedd(Job caretaker)
condor_submit
gridmanager
gridmanager
pbs/lsf-gahp
PBS or LSFcondor-gahp
gahp
Globusgatekeeper
schedd1. Glide-in
2. Submit jobs
![Page 131: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/131.jpg)
137http://www.cs.wisc.edu/condor
Matchmaking with Condor-C
› In all of these examples, Condor-C went to a specific remote schedd
› This is not required: you can do matchmaking
![Page 132: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/132.jpg)
138http://www.cs.wisc.edu/condor
Matchmaking with Condor-C
schedd(Job caretaker)
condor_submit
gridmanager condor-gahp
matchmaker
schedd
schedd
… submit job
![Page 133: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/133.jpg)
139http://www.cs.wisc.edu/condor
Using Condor-C# minimal submit file for a Condor-C job universe = grid grid_type = condor executable = myjob output = myoutput error = myerror log = mylog remote_pool = machine1.example.com remote_schedd = [email protected]+remote_jobuniverse = 5 # vanilla+remote_requirements = True queue
![Page 134: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/134.jpg)
140http://www.cs.wisc.edu/condor
Condor-C is in development
› Condor-C is in active development› You can get it in Condor 6.7.3› Authentication is limited, coming
very soon› Remote schedd must not be root
(coming soon)› Fancier setups may require
experimentation and/or handholding
![Page 135: Condor User Tutorial Fermilab 27-Jan-2005](https://reader034.fdocuments.in/reader034/viewer/2022051218/56815a87550346895dc7f71e/html5/thumbnails/135.jpg)
141http://www.cs.wisc.edu/condor
Thank you!