Using condor an introduction condor week 2008
Download
1 / 149

Using Condor An Introduction Condor Week 2008 - PowerPoint PPT Presentation


  • 137 Views
  • Uploaded on

Using Condor An Introduction Condor Week 2008. The Condor Project (Established ‘85). Distributed High Throughput Computing research performed by a team of ~35 faculty, full time staff and students. The Condor Project (Established ‘85).

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Using Condor An Introduction Condor Week 2008' - wyman


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Using condor an introduction condor week 2008

Using Condor An IntroductionCondor Week 2008


The condor project established 85
The Condor Project (Established ‘85)

Distributed High Throughput Computing research performed by a team of ~35 faculty, full time staff and students.


The condor project established 851
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.


Some free software produced by the condor project
Some free software produced by the Condor Project

  • MW

  • NeST / LotMan

  • Stork

  • And others… all as open source

  • Condor System

  • VDT

  • Metronome

  • ClassAd Library

  • DAGMan

  • Hawkeye

  • GCB


Full featured system
Full featured system

  • Flexible scheduling policy engine via ClassAds

    • Preemption, suspension, requirements, preferences, groups, quotas, settable fair-share, system hold…

  • Facilities to manage BOTH dedicated CPUs (clusters) and non-dedicated resources (desktops)

  • Transparent Checkpoint/Migration for many types of serial jobs

  • No shared file-system required

  • Federate clusters w/ a wide array of Grid Middleware

  • Workflow management (inter-dependencies)

  • Support for many job types – serial, parallel, etc.

  • Fault-tolerant: can survive crashes, network outages, no single point of failure.

  • Development APIs: via SOAP / web services, DRMAA (C), Perl package, GAHP, flexible command-line tools, MW

  • Platforms: Linux i386/IA64, Windows 2k/XP, MacOS, Solaris, IRIX, HP-UX, Compaq Tru64, … lots.



Frieda s application
Frieda’s Application …

Run a Parameter Sweep 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 6 hours to compute on a “typical” workstation (total = 600 × 6 = 3600 hours)

  • F requires a “moderate” (256MB) amount of memory

  • F performs “moderate” I/O - (x,y,z) is 5 MB and F(x,y,z) is 50 MB


I have 600 simulations to run where can i get help
I have 600simulations to run.Where can I get help?


While sharing a beverage with some colleagues, she shares her problem. Somebody asks “Have you tried Condor? It’s free.”


Getting condor
Getting Condor her problem. Somebody asks “Have you tried Condor? It’s free.”

  • Available as a free download from

    http://www.cs.wisc.edu/condor

  • Download Condor for your operating system

    • Available for most UNIX (including Linux and Apple’s OS/X) platforms

    • Also for Windows XP / 2003 / Vista


Condor releases
Condor Releases her problem. Somebody asks “Have you tried Condor? It’s free.”

  • Stable / Developer Releases

    • Version numbering scheme similar to that of the (pre 2.6) Linux kernels …

    • Major.minor.release

      • Minor is even (a.b.c): Stable

        • Examples: 6.6.3, 6.8.4, 6.8.5

        • Very stable, mostly bug fixes

      • Minor is odd (a.b.c): Developer

        • New features, may have some bugs

        • Examples: 6.7.11, 6.9.1, 6.9.2


Frieda installs a personal condor on her machine
Frieda Installs a “Personal Condor” on her machine… her problem. Somebody asks “Have you tried Condor? It’s free.”

  • What do we mean by a “Personal” Condor?

    • Condor on your own workstation

    • No root / administrator access required

    • No system administrator intervention needed

  • After installation, Frieda submits her jobs to her Personal Condor…


personal her problem. Somebody asks “Have you tried Condor? It’s free.”

Condor

your

workstation

600 Condor

jobs


Personal condor what s the benefit of a condor pool with just one user and one machine
Personal Condor?! her problem. Somebody asks “Have you tried Condor? It’s free.”What’s the benefit of a Condor “Pool” with just one user and one machine?


Your personal condor will
Your Personal Condor will ... her problem. Somebody asks “Have you tried Condor? It’s free.”

  • 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


Definitions
Definitions her problem. Somebody asks “Have you tried Condor? It’s free.”

  • Job

    • The Condor representation of your work

  • Machine

    • The Condor representation of computers and that can perform the work

  • Match Making

    • Matching a job with a machine “Resource”


Job her problem. Somebody asks “Have you tried Condor? It’s free.”

Jobs state their requirements and preferences:

I need a Linux/x86 platform

I want the machine with the most memory

I prefer a machine in the chemistry department


Machine
Machine her problem. Somebody asks “Have you tried Condor? It’s free.”

Machines state their requirements and preferences:

Run jobs only when there is no keyboard activity

I prefer to run Frieda’s jobs

I am a machine in the physics department

Never run jobs belonging to Dr. Smith


The magic of matchmaking
The Magic of Matchmaking her problem. Somebody asks “Have you tried Condor? It’s free.”

  • Jobs and machines state their requirements and preferences

  • Condor matches jobs with machines

    based on requirements and preferences


Getting started submitting jobs to condor
Getting Started: her problem. Somebody asks “Have you tried Condor? It’s free.”Submitting Jobs to Condor

  • Overview:

    • Choose a “Universe” for your job

    • Make your job “batch-ready”

    • Create a submit description file

    • Run condor_submitto put your job in the queue


1 choose the universe
1. Choose the “Universe” her problem. Somebody asks “Have you tried Condor? It’s free.”

  • Controls how Condor handles jobs

  • Choices include:

    • Vanilla

    • Standard

    • Grid

    • Java

    • Parallel

    • VM


Using the vanilla universe
Using the Vanilla Universe her problem. Somebody asks “Have you tried Condor? It’s free.”

  • The Vanilla Universe:

    • Allows running almost any “serial” job

    • Provides automatic file transfer, etc.

    • Like vanilla ice cream

      • Can be used in just about any situation


2 make your job batch ready
2. Make your job batch-ready her problem. Somebody asks “Have you tried Condor? It’s free.”

Must be able to run in the background

  • No interactive input

  • No GUI/window clicks

  • No music ;^)


Make your job batch ready continued
Make your job batch-ready (continued)… her problem. Somebody asks “Have you tried Condor? It’s free.”

  • Job can still use STDIN, STDOUT, and STDERR (the keyboard and the screen), but files are used for these instead of the actual devices

  • Similar to UNIX shell:

    • $ ./myprogram <input.txt >output.txt


3 create a submit description file
3. Create a Submit Description File her problem. Somebody asks “Have you tried Condor? It’s free.”

  • A plain ASCII text file

  • Condor does not care about file extensions

  • 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.


Simple submit description file
Simple Submit Description File her problem. Somebody asks “Have you tried Condor? It’s free.”

# 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 = vanilla

Executable = my_job

Output = output.txt

Queue


4 run condor submit
4. Run condor_submit her problem. Somebody asks “Have you tried Condor? It’s free.”

  • You give condor_submit the name of the submit file you have created:

    • condor_submit my_job.submit

  • condor_submit:

    • Parses the submit file, checks for errors

    • Creates a “ClassAd” that describes your job(s)

    • Puts job(s) in the Job Queue


Classad
ClassAd ? her problem. Somebody asks “Have you tried Condor? It’s free.”

  • Condor’s internal data representation

    • Similar to classified ads (as the name implies)

    • Represent an object & its attributes

      • Usually many attributes

    • Can also describe what an object matches with


Classad details
ClassAd Details her problem. Somebody asks “Have you tried Condor? It’s free.”

  • ClassAds can contain a lot of details

    • The job’s executable is analysis.exe

    • The machine’s load average is 5.6

  • ClassAds can specify requirements

    • I require a machine with Linux

  • ClassAds can specify preferences

    • This machine prefers to run jobs from the physics group


Classad details continued
ClassAd Details (continued) her problem. Somebody asks “Have you tried Condor? It’s free.”

  • ClassAds are:

    • semi-structured

    • user-extensible

    • schema-free

    • Attribute = Expression


Classad example

Example: her problem. Somebody asks “Have you tried Condor? It’s free.”

MyType = "Job"

TargetType = "Machine"

ClusterId = 1377

Owner = "roy"

Cmd = "sim.exe"

Requirements =

(Arch == "INTEL")

&& (OpSys == "LINUX")

&& (Disk >= DiskUsage)

&& ((Memory * 1024)>=ImageSize)

String

Number

Boolean

ClassAd Example


The dog

ClassAd her problem. Somebody asks “Have you tried Condor? It’s free.”

Type = “Dog”

Color = “Brown”

Price = 12

ClassAd for the “Job”

. . .

Requirements =

(type == “Dog”) &&

(color == “Brown”) &&

(price <= 15)

. . .

The Dog


The job queue
The Job Queue her problem. Somebody asks “Have you tried Condor? It’s free.”

  • condor_submit sends your job’s ClassAd(s) to the schedd

  • The schedd (more details later):

    • Manages the local job queue

    • Stores the job in the job queue

      • Atomic operation, two-phase commit

      • “Like money in the bank”

  • View the queue with condor_q


Example condor submit and condor q
Example her problem. Somebody asks “Have you tried Condor? It’s free.”condor_submit and condor_q

% condor_submit my_job.submit

Submitting 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

%


Input output error files
Input, output & error files her problem. Somebody asks “Have you tried Condor? It’s free.”

  • Controlled by submit file settings

  • You can define the job’s standard input, standard output and standard error:

    • Read job’s standard input from “input_file”:

      • Input = input_file

      • Shell equivalent: program <input_file

    • Write job’s standard ouput to “output_file”:

      • Output = output_file

      • Shell equivalent: program >output_file

    • Write job’s standard error to “error_file”:

      • Error = error_file

      • Shell equivalent: program 2>error_file


Email about your job
Email about your job her problem. Somebody asks “Have you tried Condor? It’s free.”

  • Condor sends email about job events to the submitting user

  • Specify “notification” in your submit file to control which events:

    Notification = complete

    Notification = never

    Notification = error

    Notification = always

Default


Feedback on your job
Feedback on your job her problem. Somebody asks “Have you tried Condor? It’s free.”

  • Create a log of job events

  • Add to submit description file:

    log = sim.log

  • Becomes the Life Story of a Job

    • Shows all events in the life of a job

    • Always have a log file


Sample condor user log
Sample Condor User Log her problem. Somebody asks “Have you tried Condor? It’s free.”

000 (0001.000.000) 05/25 19:10:03 Job submitted from host: <128.105.146.14:1816>

...

001 (0001.000.000) 05/25 19:12:17 Job executing on host: <128.105.146.14:1026>

...

005 (0001.000.000) 05/25 19:13:06 Job terminated.

(1) Normal termination (return value 0)

...


Example submit description file with logging
Example Submit Description File With Logging her problem. Somebody asks “Have you tried Condor? It’s free.”

# 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 = vanilla

Executable = /home/frieda/condor/my_job.condor

Log = my_job.log·Job log (from Condor)

Input = my_job.in·Program’s standard input

Output = my_job.out ·Program’s standard output

Error = my_job.err·Program’s standard error

Arguments = -a1 -a2·Command line arguments

InitialDir = /home/frieda/condor/run

Queue


Clusters and processes
“Clusters” and “Processes” her problem. Somebody asks “Have you tried Condor? It’s free.”

  • If your submit file describes multiple jobs, we call this a “cluster”

  • Each cluster has a unique “cluster number”

  • Each job in a cluster is called a “process”

    • Process numbers always start at zero

  • A Condor “Job ID” is the cluster number, a period, and the process number (i.e. 2.1)

    • A cluster can have a single process

      • Job ID = 20.0 ·Cluster 20, process 0

    • Or, a cluster can have more than one process

      • Job ID: 21.0, 21.1, 21.2 ·Cluster 21, process 0, 1, 2


Submit file for a cluster
Submit File for a Cluster her problem. Somebody asks “Have you tried Condor? It’s free.”

# Example submit file for a cluster of 2 jobs

# with separate input, output, error and log files

Universe = vanilla

Executable = my_job

Arguments = -x 0

log = my_job_0.log

Input = my_job_0.in

Output = my_job_0.out

Error = my_job_0.err

Queue·Job 2.0 (cluster 2, process 0)

Arguments = -x 1

log = my_job_1.log

Input = my_job_1.in

Output = my_job_1.out

Error = my_job_1.err

Queue·Job 2.1 (cluster 2, process 1)


Submitting the job
Submitting The Job her problem. Somebody asks “Have you tried Condor? It’s free.”

% 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 4/15 06:52 0+00:02:11 R 0 0.0 my_job –a1 –a2

2.0 frieda 4/15 06:56 0+00:00:00 I 0 0.0 my_job –x 0

2.1 frieda 4/15 06:56 0+00:00:00 I 0 0.0 my_job –x 1

3 jobs; 2 idle, 1 running, 0 held

%


Back to our 600 jobs
Back to our 600 jobs… her problem. Somebody asks “Have you tried Condor? It’s free.”

  • We could put all input, output, error & log files in the one directory

    • One of each type for each job

    • That’d be 2400 files (4 files × 600 jobs)

    • Difficult to sort through

  • Better: Create a subdirectory for each run


Organize your files and directories for big runs
Organize your files and directories for big runs her problem. Somebody asks “Have you tried Condor? It’s free.”

  • Create subdirectories for each “run”

    • run_0, run_1, … run_599

  • Create input files in each of these

    • run_0/simulation.in

    • run_1/simulation.in

    • run_599/simulation.in

  • The output, error & log files for each job will be created by Condor from your job’s output


simulation.in her problem. Somebody asks “Have you tried Condor? It’s free.”

simulation.out

simulation.err

simulation.log

simulation.in

simulation.out

simulation.err

simulation.log

Frieda’s simulation directory

sim.exe

sim.sub

run_0

run_599


Submit description file for 600 jobs
Submit Description File for 600 Jobs her problem. Somebody asks “Have you tried Condor? It’s free.”

# Cluster of 600 jobs with different directories

Universe = vanilla

Executable = sim

Log = simulation.log

...

Arguments = -x 0

InitialDir = run_0·Log, input, output & error files -> run_0

Queue ·Job 3.0 (Cluster 3, Process 0)

Arguments = -x 1

InitialDir = run_1·Log, input, output & error files -> run_1

Queue ·Job 3.1 (Cluster 3, Process 1)

·Do this 598 more times…………


Submit file for a big cluster of jobs
Submit File for a Big her problem. Somebody asks “Have you tried Condor? It’s free.”Cluster of Jobs

  • We just submitted 1 cluster with 600 processes

  • All the input/output files will be in different directories

  • The submit file is pretty unwieldy (over 1200 lines)

  • Isn’t there a better way?


Submit file for a big cluster of jobs the better way 1
Submit File for a Big her problem. Somebody asks “Have you tried Condor? It’s free.”Cluster of Jobs (the better way) #1

  • We can queue all 600 in 1 “Queue” command

    • Queue 600

  • Condor provides $(Process) and $(Cluster)

    • $(Process) will be expanded to the process number for each job in the cluster

      • 0, 1, … 599

    • $(Cluster) will be expanded to the cluster number

      • Will be 4 for all jobs in this cluster


Submit file for a big cluster of jobs the better way 2
Submit File for a Big her problem. Somebody asks “Have you tried Condor? It’s free.”Cluster of Jobs (the better way) #2

  • The initial directory for each job can be specified using $(Process)

    • InitialDir = run_$(Process)

    • Condor will expand these to “run_0”, “run_1”, … “run_599” directories

  • Similarly, arguments can be variable

    • Arguments = -x $(Process)

    • Condor will expand these to “-x 0”, “-x 1”, … “-x 599”


Better submit file for 600 jobs
Better Submit File for 600 Jobs her problem. Somebody asks “Have you tried Condor? It’s free.”

# Example condor_submit input file that defines

# a cluster of 600 jobs with different directories

Universe = vanilla

Executable = my_job

Log = my_job.log

Input = my_job.in

Output = my_job.out

Error = my_job.err

Arguments = –x $(Process) ·–x 0, -x 1, … -x 599

InitialDir = run_$(Process) ·run_0 … run_599

Queue 600·Jobs 4.0 … 4.599


Now we submit it
Now, we submit it… her problem. Somebody asks “Have you tried Condor? It’s free.”

$ condor_submit my_job.submit

Submitting job(s) ...............................................................................................................................................................................................................................................................

Logging submit event(s) ...............................................................................................................................................................................................................................................................

600 job(s) submitted to cluster 4.


And check the queue
And, Check the queue her problem. Somebody asks “Have you tried Condor? It’s free.”

$condor_q

-- Submitter: x.cs.wisc.edu : <128.105.121.53:510> : x.cs.wisc.edu

ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD

4.0 frieda 4/20 12:08 0+00:00:05 R 0 9.8 my_job -arg1 –x 0

4.1 frieda 4/20 12:08 0+00:00:03 I 0 9.8 my_job -arg1 –x 1

4.2 frieda 4/20 12:08 0+00:00:01 I 0 9.8 my_job -arg1 –x 2

4.3 frieda 4/20 12:08 0+00:00:00 I 0 9.8 my_job -arg1 –x 3

...

4.598 frieda 4/20 12:08 0+00:00:00 I 0 9.8 my_job -arg1 –x 598

4.599 frieda 4/20 12:08 0+00:00:00 I 0 9.8 my_job -arg1 –x 599

600 jobs; 599 idle, 1 running, 0 held


Removing jobs
Removing jobs her problem. Somebody asks “Have you tried Condor? It’s free.”

  • If you want to remove a job from the Condor queue, you use condor_rm

  • You can only remove jobs that you own

  • Privileged user can remove any jobs

    • “root” on UNIX

    • “administrator” on Windows


Removing jobs continued
Removing jobs (continued) her problem. Somebody asks “Have you tried Condor? It’s free.”

  • Remove an entire cluster:

    • condor_rm 4 ·Removes the whole cluster

  • Remove a specific job from a cluster:

    • condor_rm 4.0 ·Removes a single job

  • Or, remove all of your jobs with “-a”

    • condor_rm -a ·Removes all jobs / clusters


Good News her problem. Somebody asks “Have you tried Condor? It’s free.”

(Boss Fat Cat)

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.


Adding nodes
Adding nodes her problem. Somebody asks “Have you tried Condor? It’s free.”

  • Frieda installs Condor on the desktop machines, and configures them with her machine as the central manager

    • The central manager:

      • Central repository for the whole pool

      • Performs job / machine matching, etc.

  • These are “non-dedicated” nodes, meaning that they can't always run Condor jobs


personal her problem. Somebody asks “Have you tried Condor? It’s free.”

Condor

Condor Pool

your

workstation

600 Condor

jobs


Condor status
condor_status her problem. Somebody asks “Have you tried Condor? It’s free.”

% condor_status

Name OpSys Arch State Activ LoadAv Mem ActvtyTime

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 Suspe 1.130 511 0+00:00:55

[email protected] LINUX INTEL Unclaimed Idle 0.000 255 0+01:03:28

[email protected] LINUX INTEL Unclaimed Idle 0.190 255 0+01:03:29


How can my jobs access their data files
How can my jobs access their data files? her problem. Somebody asks “Have you tried Condor? It’s free.”


Access to data in condor
Access to Data in Condor her problem. Somebody asks “Have you tried Condor? It’s free.”

  • Use shared filesystem if available

  • No shared filesystem?

    • Condor can transfer files

      • Can automatically send back changed files

      • Atomic transfer of multiple files

      • Can be encrypted over the wire

    • Remote I/O Socket

    • Standard Universe can use remote system calls (more on this later)


Condor file transfer

Universe = vanilla her problem. Somebody asks “Have you tried Condor? It’s free.”

Executable = my_job

Log = my_job.log

ShouldTransferFiles = IF_NEEDED

Transfer_input_files = dataset.$(Process), common.data

Transfer_output_files = TheAnswer.dat

Queue 600

Condor File Transfer

  • ShouldTransferFiles = YES

    • Always transfer files to execution site

  • ShouldTransferFiles = NO

    • Rely on a shared filesystem

  • ShouldTransferFiles = IF_NEEDED

    • Will automatically transfer the files if the submit and execute machine are not in the same FileSystemDomain


We always want more
We Always Want More her problem. Somebody asks “Have you tried Condor? It’s free.”

Condor is managing and running our jobs, but

  • Our CPU requirements are greater than our resources

  • Jobs are preempted more often than we like


Happy day frieda s organization purchased a dedicated cluster
Happy Day! Frieda’s organization purchased a Dedicated Cluster!

  • Frieda Installs Condor on all the dedicated Cluster nodes

  • Frieda also adds a dedicated central manager

  • She configures her entire pool with this new host as the central manager…


Frieda s condor pool
Frieda’s Condor Pool Cluster!

600 Condor

jobs

Dedicated Cluster

Condor Pool

With the additional resources, Frieda and her co-workers can get their jobs completed even faster.



Frieda submits some mpi jobs
Frieda submits some MPI jobs Cluster!

universe = parallel

executable = mp1script

arguments = my_mpich_linked_executable arg1 arg2

machine_count = 4

should_transfer_files = yes

when_to_transfer_output = on_exit

transfer_input_files = my_mpich_linked_executable

queue



Condor master
condor_master they do?

  • 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

  • Acts as the server for many Condor remote administration commands:

    • condor_reconfig, condor_restart, condor_off, condor_on, condor_config_val, etc.


Condor daemon layout

Personal Condor / Central Manager they do?

negotiator

startd

schedd

collector

= Process Spawned

Condor Daemon Layout

Master


Central manager condor collector
Central Manager: they do?condor_collector

  • Central manager: central repository and match maker for whole pool

  • 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)

  • Only on the Central Manager

  • At least one collector per pool


Condor pool layout collector

= Process Spawned they do?

Central Manager

Condor Pool Layout: Collector

= ClassAd

Communication

Pathway

Master

Collector


Central manager condor negotiator
Central Manager: they do?condor_negotiator

  • Performs “matchmaking” in Condor

  • Each “Negotiation Cycle” (typically 5 minutes):

    • 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

  • Only one negotiator per pool

  • Only on the Central Manager


Condor pool layout negotiator

= Process Spawned they do?

Central Manager

Condor Pool Layout: Negotiator

= ClassAd

Communication

Pathway

Master

negotiator

Collector


Execute hosts condor startd
Execute Hosts: they do?condor_startd

  • Execute host: machines that run user jobs

  • 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 in the administrator’s tutorial)

  • Creates a “starter” for each running job

  • One startd runs on each execute node


Condor pool layout startd

Cluster Node they do?

= Process Spawned

Central Manager

Master

startd

Cluster Node

Master

startd

Condor Pool Layout: startd

= ClassAd

Communication

Pathway

Master

negotiator

Collector


Submit hosts condor schedd
Submit Hosts: they do?condor_schedd

  • Submit hosts: machines that users can submit jobs on

  • 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, …

  • Creates a “shadow” for each running job

  • One schedd runs on each submit host


Condor pool layout schedd

Cluster Node they do?

= Process Spawned

Central Manager

Master

startd

Cluster Node

Master

Desktop

startd

Desktop

Condor Pool Layout: schedd

= ClassAd

Communication

Pathway

Master

negotiator

negotiator

schedd

Collector

Master

Master

startd

startd

schedd

schedd


Condor pool layout master

Cluster Node they do?

= Process Spawned

Central Manager

Master

Master

Master

negotiator

startd

schedd

schedd

Cluster Node

Master

Master

startd

Desktop

Desktop

Master

Master

Condor Pool Layout: master

= ClassAd

Communication

Pathway

Master

negotiator

Collector

Master

Master

startd

startd

schedd

schedd


Now what
Now what? they do?

  • Some of the machines in the pool can’t run my jobs

    • Not enough RAM

    • Not enough scratch disk space

    • Required software not installed

    • Etc.


Specify requirements

Universe = vanilla they do?

Executable = my_job

Log = my_job.log

InitialDir = run_$(Process)

Requirements = Memory >= 256 && Disk > 10000

Queue 600

Specify Requirements

  • An expression (syntax similar to C or Java)

  • Must evaluate to True for a match to be made


Advanced requirements

Universe = vanilla they do?

Executable = $$(MyProgPath)

Log = my_job.log

InitialDir = run_$(Process)

Requirements = Memory >= 256 && Disk > 10000 \

&& ( MyProgPath =!= UNDEFINED) )

Queue 600

Advanced Requirements

  • Requirements can match custom attributes in your Machine Ad

    • Can be added by hand to each machine

    • Or, automatically using the “Hawkeye” mechanism


And specify rank

Universe = vanilla they do?

Executable = my_job

Log = my_job.log

Arguments = -arg1 –arg2

InitialDir = run_$(Process)

Requirements = Memory >= 256 && Disk > 10000

Rank = (KFLOPS*10000) + Memory

Queue 600

And, Specify Rank

  • All matches which meet the requirements can be sorted by preference with a Rank expression.

  • Higher the Rank, the better the match



Check the queue
Check the queue they do?

  • Check the queue with condor_q:

    bash-2.05a$ condor_q

    -- Submitter: x.cs.wisc.edu : <128.105.121.53:510> :x.cs.wisc.edu

    ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD

    5.0 frieda 4/20 12:23 0+00:00:00 I 0 9.8 my_job -arg1 –n 0

    5.1 frieda 4/20 12:23 0+00:00:00 I 0 9.8 my_job -arg1 –n 1

    5.2 frieda 4/20 12:23 0+00:00:00 I 0 9.8 my_job -arg1 –n 2

    5.3 frieda 4/20 12:23 0+00:00:00 I 0 9.8 my_job -arg1 –n 3

    5.4 frieda 4/20 12:23 0+00:00:00 I 0 9.8 my_job -arg1 –n 4

    5.5 frieda 4/20 12:23 0+00:00:00 I 0 9.8 my_job -arg1 –n 5

    5.6 frieda 4/20 12:23 0+00:00:00 I 0 9.8 my_job -arg1 –n 6

    5.7 frieda 4/20 12:23 0+00:00:00 I 0 9.8 my_job -arg1 –n 7

    6.0 frieda 4/20 13:22 0+00:00:00 H 0 9.8 my_job -arg1 –arg2

    8 jobs; 8 idle, 0 running, 1 held


Look at jobs on hold
Look at jobs on hold they do?

%condor_q –hold

-- Submiter: x.cs.wisc.edu : <128.105.121.53:510> :x.cs.wisc.edu

ID OWNER HELD_SINCE HOLD_REASON

6.0 frieda 4/20 13:23 Error from starter on skywalker.cs.wisc.edu

9 jobs; 8 idle, 0 running, 1 held

Or, See full details for a job

% condor_q –l 6.0


Check machine status
Check machine status they do?

  • Verify that there are idle machines with condor_status:

    bash-2.05a$ condor_status

    Name OpSys Arch State Activity LoadAv Mem ActvtyTime

    [email protected] LINUX INTEL Claimed Busy 0.000 501 0+00:00:20

    [email protected] LINUX INTEL Claimed Busy 0.000 501 0+00:00:19

    [email protected] LINUX INTEL Claimed Busy 0.040 501 0+00:00:17

    [email protected] LINUX INTEL Claimed Busy 0.000 501 0+00:00:05

    Total Owner Claimed Unclaimed Matched Preempting

    INTEL/LINUX 4 0 4 0 0 0

    Total 4 0 4 0 0 0


Look in job log
Look in Job Log they do?

  • Look in your job log for clues:

    bash-2.05a$ cat my_job.log

    000 (031.000.000) 04/20 14:47:31 Job submitted from host: <128.105.121.53:48740>

    ...

    007 (031.000.000) 04/20 15:02:00 Shadow exception!

    Error from starter on gig06.stat.wisc.edu: Failed to open '/scratch.1/frieda/workspace/v67/condor-test/test3/run_0/my_job.in' as standard input: No such file or directory (errno 2)

    0 - Run Bytes Sent By Job

    0 - Run Bytes Received By Job

    ...


Still not running exercise a little patience
Still not running? they do?Exercise a little patience

  • On a busy pool, it can take a while to match and start your jobs

  • Wait at least a negotiation cycle or two (typically a few minutes)


Look to condor q for help condor q analyze
Look to condor_q for help: they do?condor_q -analyze

bash-2.05a$ condor_q -ana 29

---

029.000: Run analysis summary. Of 1243 machines,

1243 are rejected by your job's requirements

0 are available to run your job

WARNING: Be advised:

No resources matched request's constraints

Check the Requirements expression below:

Requirements = ((Memory > 8192)) && (Arch == "INTEL") && (OpSys == "LINUX") && (Disk >= DiskUsage) && (TARGET.FileSystemDomain == MY.FileSystemDomain)


Better analysis linux only condor q better analyze
Better analysis (Linux only): they do?condor_q –better-analyze

bash-2.05a$ condor_q -better-ana 29

The Requirements expression for your job is:

( ( target.Memory > 8192 ) ) && ( target.Arch == "INTEL" ) &&

( target.OpSys == "LINUX" ) && ( target.Disk >= DiskUsage ) &&

( TARGET.FileSystemDomain == MY.FileSystemDomain )

Condition Machines Matched Suggestion

--------- ---------------- ----------

1 ( ( target.Memory > 8192 ) ) 0 MODIFY TO 4000

2 ( TARGET.FileSystemDomain == "cs.wisc.edu" )584

3 ( target.Arch == "INTEL" ) 1078

4 ( target.OpSys == "LINUX" ) 1100

5 ( target.Disk >= 13 ) 1243


Learn about available resources
Learn about available resources: they do?

bash-2.05a$ condor_status –const 'Memory > 8192'

(no output means no matches)

bash-2.05a$ condor_status -const 'Memory > 4096'

Name OpSys Arch State Activ LoadAv Mem ActvtyTime

[email protected] LINUX X86_64 Unclaimed Idle 0.000 5980 1+05:35:05

[email protected] LINUX X86_64 Unclaimed Idle 0.000 5980 13+05:37:03

[email protected] LINUX X86_64 Unclaimed Idle 0.000 7988 1+06:00:05

[email protected] LINUX X86_64 Unclaimed Idle 0.000 7988 13+06:03:47

Total Owner Claimed Unclaimed Matched Preempting

X86_64/LINUX 4 0 0 4 0 0

Total 4 0 0 4 0 0


Job policy expressions
Job Policy Expressions they do?

  • User can supply job policy expressions in the submit file.

  • Can be used to describe a successful run.

    on_exit_remove = <expression>

    on_exit_hold = <expression>

    periodic_remove = <expression>

    periodic_hold = <expression>


Job policy examples
Job Policy Examples they do?

  • Do not remove 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) ) || ( (ServerStartTime - JobStartDate) < 3600)

  • Place on hold if job has spent more than 50% of its time suspended:

    • periodic_hold = CumulativeSuspensionTime > (RemoteWallClockTime / 2.0)


Insert classad attributes
Insert ClassAd attributes they do?

  • Special purpose usage

  • In the submit description file, introduce an attribute for the job

    +Department = “biochemistry”

    causes the ClassAd to contain

    Department = “biochemistry”


We ve seen how condor can
We’ve seen how Condor can: they do?

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



My new jobs run for 20 days
My new jobs run for 20 days… they do?

  • What happens when a job is forced off it’s CPU?

    • Preempted by higher priority user or job

    • Vacated because of user activity

  • How can I add fault tolerance to my jobs?


Condor s standard universe to the rescue
Condor’s they do?Standard Universe to the rescue!

  • Support for transparent process checkpoint and restart

  • Remote system calls (remote I/O)

    • Your job can read / write files as if they were local


Remote system calls in the standard universe
Remote System Calls in they do?the Standard Universe

  • I/O system calls are trapped and sent back to the submit machine

    Examples: open a file, write to a file

  • No source code changes typically required

  • Programming language independent


Process checkpointing in the standard universe
Process Checkpointing in the they do?Standard Universe

  • Condor’s process checkpointing provides a mechanism to automatically save the state of a job

  • The process can then be restarted from right where it was checkpointed

    • After preemption, crash, etc.


Checkpointing process starts
Checkpointing: they do?Process Starts

checkpoint: the entire state of a program, saved in a file

  • CPU registers, memory image, I/O

time


Checkpointing process checkpointed
Checkpointing: they do?Process Checkpointed

time

1

2

3


Checkpointing process killed
Checkpointing: they do?Process Killed

time

Killed!

3

3


Checkpointing process resumed
Checkpointing: they do?Process Resumed

goodput

goodput

badput

time

3

3


When will condor checkpoint your job
When will Condor checkpoint your job? they do?

  • Periodically, if desired

    • For fault tolerance

  • When your job is preempted by a higher priority job

  • When your job is vacated because the execution machine becomes busy

  • When you explicitly run condor_checkpoint, condor_vacate, condor_off or condor_restart command


Making the standard universe work
Making the Standard Universe Work they do?

  • The job must be relinked with Condor’s standard universe support library

  • To relink, place condor_compile in front of the command used to link the job:

% condor_compile gcc -o myjob myjob.c

- OR -

% condor_compile f77 -o myjob filea.f fileb.f

- OR -

% condor_compile make –f MyMakefile


Limitations of the standard universe
Limitations of the they do?Standard Universe

  • Condor’s checkpointing is not at the kernel level.

    • Standard Universe the job may not:

      • Fork()

      • Use kernel threads

      • Use some forms of IPC, such as pipes and shared memory

  • Must have access to source code to relink

  • Many typical scientific jobs are OK


Connecting condors
Connecting Condors they do?

  • Frieda knows people with their own Condor pools, and gets permission to use their computing resources…

  • How can Condor help her do this?


Connect condors with flocking
Connect Condors they do?with Flocking

  • Frieda configures her Condor pool to “flock” to her friend’s pool.

  • Flocking is a Condor-specific technology.


Frieda s condor pool1
Frieda’s Condor Pool they do?

600 Condor

jobs

Friendly Condor Pool

Condor Pool


Frieda meets the grid
Frieda meets The Grid they do?

  • Frieda also has access to grid resources she wants to use

    • She has certificates and access to Globus or other resources at remote institutions

  • But Frieda wants Condor’s queue management features for her jobs!

  • She installs Condor so she can submit “Grid Universe” jobs to Condor


Grid universe
“Grid” Universe they do?

  • All handled in your submit file

  • Supports a number of “back end” types:

    • Globus: GT2, GT4

    • NorduGrid

    • UNICORE

    • Condor

    • PBS

    • LSF

    • EC2

    • NQS


Grid universe globus 2
Grid Universe & Globus 2 they do?

  • Used for a Globus GT2 back-end

    • “Condor-G”

  • Format:

    Grid_Resource = gt2 Head-Node

    Globus_rsl = <RSL-String>

  • Example:

    Universe = grid

    Grid_Resource = gt2 beak.cs.wisc.edu/jobmanager

    Globus_rsl = (queue=long)(project=atom-smasher)


Grid universe globus 4
Grid Universe & Globus 4 they do?

  • Used for a Globus GT4 back-end

  • Format:

    Grid_Resource = gt4 <Head-Node> <Scheduler-Type>

    Globus_XML = <XML-String>

  • Example:

    Universe = grid

    Grid_Resource = gt4 beak.cs.wisc.edu Condor

    Globus_xml = <queue>long</queue><project>atom-smasher</project>


Grid universe condor
Grid Universe & Condor they do?

  • Used for a Condor back-end

    • “Condor-C”

  • Format:

    Grid_Resource = condor <Schedd-Name> <Collector-Name>

    Remote_<param> = <value>

    • “Remote_” part is stripped off

  • Example:

    Universe = grid

    Grid_Resource = condor beak condor.cs.wisc.edu

    Remote_Universe = standard


Grid universe nordugrid
Grid Universe & NorduGrid they do?

  • Used for a NorduGrid back-end

    Grid_Resource = nordugrid <Host-Name>

  • Example:

    Universe = grid

    Grid_Resource = nordugrid ngrid.cs.wisc.edu


Grid universe unicore
Grid Universe & UNICORE they do?

  • Used for a UNICORE back-end

  • Format:

    Grid_Resource = unicore <USite> <VSite>

  • Example:

    Universe = grid

    Grid_Resource = unicore uhost.cs.wisc.edu vhost


Grid universe pbs
Grid Universe & PBS they do?

  • Used for a PBS back-end

  • Format:

    Grid_Resource = pbs

  • Example:

    Universe = grid

    Grid_Resource = pbs


Grid universe lsf
Grid Universe & LSF they do?

  • Used for a LSF back-end

  • Format:

    Grid_Resource = lsf

  • Example:

    Universe = grid

    Grid_Resource = lsf


Credential management
Credential Management they do?

  • Condor will do The Right Thing™ with your X509 certificate and proxy

  • Override default proxy:

    • X509UserProxy = /home/frieda/other/proxy

  • Proxy may expire before jobs finish executing

    • Condor can use MyProxy to renew your proxy

    • When a new proxy is available, Condor will forward the renewed proxy to the job

    • This works for non-grid jobs, too


My jobs have have dependencies
My jobs have have dependencies… they do?

Can Condor help solve my dependency problems?


Condor universes scheduler and local
Condor Universes: they do?Scheduler and Local

  • Scheduler Universe

    • Plug in a meta-scheduler

    • Developed for DAGMan (more later)

    • Similar to Globus’s fork job manager

  • Local

    • Very similar to vanilla, but jobs run on the local host

    • Has more control over jobs than scheduler universe


Frieda learns dagman
Frieda learns DAGMan they do?

  • 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.”)


What is a dag

Job A they do?

Job B

Job C

Job D

What is a DAG?

  • A DAG is the datastructure 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!


Defining a dag

Job A they do?

Job B

Job C

Job D

Defining a DAG

  • A DAG is defined by a .dagfile, listing each of its nodes and their dependencies:

    # diamond.dag

    Job A a.sub

    Job B b.sub

    Job C c.sub

    Job D d.sub

    Parent A Child B C

    Parent B C Child D

  • each node will run the Condor job specified by its accompanying Condor submit file


Submitting a dag
Submitting a DAG they do?

  • 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 is run by the schedd

    • DAGMan daemon itself is “watched” by Condor, so you don’t have to


Running a dag

A they do?

.dag

File

Condor

Job

Queue

A

B

C

D

DAGMan

Running a DAG

  • DAGMan acts as a “meta-scheduler”, managing the submission of your jobs to Condor based on the DAG dependencies.


Running a dag cont d

A they do?

Condor

Job

Queue

B

B

C

C

D

DAGMan

Running a DAG (cont’d)

  • DAGMan holds & submits jobs to the Condor queue at the appropriate times.


Running a dag cont d1

A they do?

Rescue

File

Condor

Job

Queue

B

X

D

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.


Recovering a dag

A they do?

Rescue

File

Condor

Job

Queue

B

C

C

D

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.


Recovering a dag cont d

A they do?

Condor

Job

Queue

B

C

D

D

DAGMan

Recovering a DAG (cont’d)

  • Once that job completes, DAGMan will continue the DAG as if the failure never happened.


Finishing a dag

A they do?

Condor

Job

Queue

B

C

D

DAGMan

Finishing a DAG

  • Once the DAG is complete, the DAGMan job itself is finished, and exits.


Additional dagman features
Additional DAGMan Features they do?

  • 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”


General user commands
General User Commands they do?

  • condor_status View Pool Status

  • condor_q View Job Queue

  • condor_submit Submit new Jobs

  • condor_rm Remove Jobs

  • condor_prio Intra-User Prios

  • condor_history Completed Job Info

  • condor_submit_dag Submit new DAG

  • condor_checkpoint Force a checkpoint

  • condor_compile Link Condor library


Condor job universes

Vanilla Universe they do?

Standard Universe

Grid Universe

Scheduler Universe

Local Universe

Virtual Machine Universe

Java Universe

Parallel Universe

MPICH-1

MPICH-2

LAM

Condor Job Universes


Why have a special universe for java jobs
Why have a special Universe for Java jobs? they do?

  • Java Universe provides more than just inserting “java” at the start of the execute line of a vanilla job:

    • Knows which machines have a JVM installed

    • Knows the location, version, and performance of JVM on each machine

    • Knows about jar files, etc.

    • 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.


Universe java job
Universe Java Job they do?

  • Example Java Universe Submit file:

    Universe = java

    Executable = Main.class

    jar_files = MyLibrary.jar

    Input = infile

    Output = outfile

    Arguments = Main 1 2 3

    Queue


Java support cont
Java support, cont. they do?

bash-2.05a$ condor_status –java

Name JavaVendor Ver State Actv LoadAv Mem

abulafia.cs Sun Microsy 1.5.0_ Claimed Busy 0.180 503

acme.cs.wis Sun Microsy 1.5.0_ Unclaimed Idle 0.000 503

adelie01.cs Sun Microsy 1.5.0_ Claimed Busy 0.000 1002

adelie02.cs Sun Microsy 1.5.0_ Claimed Busy 0.000 1002

Total Owner Claimed Unclaimed Matched Preempting

INTEL/LINUX 965 179 516 250 20 0

INTEL/WINNT50 102 6 65 31 0 0

SUN4u/SOLARIS28 1 0 0 1 0 0

X86_64/LINUX 128 2 106 20 0 0

Total 1196 187 687 302 20 0


Frieda wants condor features on remote resources
Frieda wants Condor features on remote resources they do?

  • She wants to run standard universe jobs on Grid-managed resources

    • For matchmaking and dynamic scheduling of jobs

    • For job checkpointing and migration

    • For remote system calls


Condor glidein
Condor GlideIn they do?

  • Frieda can use the Grid Universe to run Condor daemons on Grid 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 remote resources

  • Currently only supports Globus GT2

    • We hope to fix this limitation


personal they do?

Condor

Globus Grid

your

workstation

600 Condor

jobs

LSF

PBS

glide-in jobs

Condor

Condor Pool

Friendly Condor Pool


Glidein concerns
GlideIn Concerns they do?

  • What if the remote 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


In review
In Review they do?

With Condor’s help, Frieda can:

  • Manage her compute job workload

  • Access local machines

  • Access remote Condor Pools via flocking

  • Access remote compute resources on the Grid via “Grid Universe” jobs

  • Carve out her own personal Condor Pool from the Grid with GlideIn technology


Administrator commands
Administrator Commands they do?

  • condor_vacate Leave a machine now

  • condor_on Start Condor

  • condor_off Stop Condor

  • condor_reconfig Reconfig on-the-fly

  • condor_config_val View/set config

  • condor_userprio User Priorities

  • condor_stats View detailed usage accounting stats



Use condorview
Use CondorView! they do?

  • Provides visual graphs of current and past utilization

  • Data is derived from Condor's own accounting statistics

  • Interactive Java applet

  • Quickly and easily view:

    • How much Condor is being used

    • How many cycles are being delivered

    • Who is using them

    • Utilization by machine platform or by user



I could also talk lots about
I could also talk lots about… they do?

  • GCB: Living with firewalls & private networks

  • Federated Grids/Clusters

  • APIs and Portals

  • MW

  • Database Support (Quill)

  • High Availability Fail-over

  • Compute On-Demand (COD)

  • Dynamic Pool Creation (“Glide-in”)

  • Role-based prioritization and accounting

  • Strong security, incl privilege separation

  • Data movement scheduling in workflows


Thank you
Thank you! they do?

Check us out on the Web:

http://www.condorproject.org

Email:

[email protected]


ad