Title: Condor User Tutorial UK Condor Week NeSC 10 / 11 / 04
1 Condor User TutorialUK Condor Week NeSC10 /
11 / 04
2Morning Outline
- Background and principals
- User Tutorial The Story of Frieda, the scientist
- Using Condor to manage jobs
- Using DAGMan to manage dependencies
- Condor-G Architecture and Mechanisms
- Globus Universe, Glide-In, etc.
3The Condor Project (Established 85)
- Distributed High Throughput Computing research
performed by a team of 35 faculty, full time
staff and students.
4The 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),
- ATT, IBM, INTEL, Microsoft, UW-Madison,
5A 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)
6Some software produced by the Condor Project
- Condor System
- ClassAd Library
- DAGMan
- Fault Tolerant Shell (FTSH)
- Hawkeye
- GCB
- MW
- NeST
- Stork
- Parrot
- Condor-G
- And others all as open source
7What 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
8Condor 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 (1000s), all the data, etc. - Condor can handle inter-job dependencies (DAGMan)
- Condor users can set job priorities
- Condor administrators can set user priorities
9Condor can manage Dedicated Resources
- Dedicated Resources
- Compute Clusters
- Grid Resources
- Manage
- Node monitoring, scheduling
- Job launch, monitor cleanup
10and 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
11Meet Frieda.
She is a scientist. But she has a big problem.
12Friedas Application
- Simulate the behavior of F(x,y,z) for 20 values
of x, 10 values of y and 3 values of z (20103
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
13I have 600simulations to run.Where can I get
help?
14 Install a Personal Condor!
15Installing Condor
- Download Condor for your operating system
- Available as a free download from
- http//www.cs.wisc.edu/condor
- Stable vs- Developer Releases
- Naming scheme similar to the Linux Kernel
- Available for most Unix platforms and Windows NT
16Or install from distributions
- Install from NMI
- http//www.nsf-middleware.org
- Condor-G only
- Install from VDT
- http//www.griphyn.org/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
17So 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 - So after installation, Frieda submits her jobs to
her Personal Condor
18(No Transcript)
19Personal Condor?!Whats the benefit of a Condor
Pool with just one user and one machine?
20Your 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
21Getting 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
22Making 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
23Creating 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.
24Simple 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 vanilla
- Executable my_job
- Queue
25Running 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 jobs 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
26Running condor_submit
- condor_submit my_job.submit-file
- Submitting job(s).
- 1 job(s) submitted to cluster 1.
- condor_q
- -- Submitter perdita.cs.wisc.edu
lt128.105.165.341027gt - ID OWNER SUBMITTED RUN_TIME
ST PRI SIZE CMD - 1.0 frieda 6/16 0652 0000000
I 0 0.0 my_job - 1 jobs 1 idle, 0 running, 0 held
27Another 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
vanilla Executable /home/wright/condor/my_job.co
ndor Input my_job.stdin Output
my_job.stdout Error my_job.stderr Arguments
-arg1 -arg2 InitialDir /home/wright/condor/r
un_1 Queue
28Clusters 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
29Example Submit Description File for a Cluster
Example condor_submit input file that defines
a cluster of two jobs with different iwd Universe
vanilla Executable my_job Arguments
-arg1 -arg2 InitialDir run_0 Queue ?
Becomes job 2.0 InitialDir run_1 Queue ?
Becomes job 2.1
30 condor_submit my_job.submit-file Submitting
job(s). 2 job(s) submitted to cluster 2.
condor_q -- Submitter perdita.cs.wisc.edu
lt128.105.165.341027gt ID OWNER
SUBMITTED RUN_TIME ST PRI SIZE CMD
1.0 frieda 6/16 0652
0000211 R 0 0.0 my_job 2.0 frieda
6/16 0656 0000000 I 0 0.0 my_job
2.1 frieda 6/16 0656 0000000 I
0 0.0 my_job 3 jobs 2 idle, 1 running, 0
held
31Submit 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 well have run_0, run_1,
run_599 directories - All the input/output files will be in different
directories!
32Submit Description File for a BIG Cluster of Jobs
- Example condor_submit input file that defines
- a cluster of 600 jobs with different iwd
- Universe vanilla
- Executable my_job
- Arguments -arg1 arg2
- InitialDir run_(Process)
- Queue 600
33Using 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 cant
run condor_rm on someone elses jobs unless you
are root) - You can give specific job IDs (cluster or
cluster.proc), or you can remove all of your jobs
with the -a option.
34Temporarily 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
35Using 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
36Getting Email from Condor
- By default, Condor will send you email when your
jobs completes - With lots of information about the run
- If you dont 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
37Getting Email from Condor (contd)
- 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_at_address.here
38A Jobs life story The User Log file
- A UserLog must 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!
39Sample Condor User Log
000 (8135.000.000) 05/25 191003 Job submitted
from host lt128.105.146.141816gt ... 001
(8135.000.000) 05/25 191217 Job executing on
host lt128.105.165.1311026gt ... 005
(8135.000.000) 05/25 191306 Job
terminated. (1) Normal termination (return value
0) Usr 0 000037, Sys 0 000000 - Run
Remote Usage Usr 0 000000, Sys 0 000005 -
Run Local Usage Usr 0 000037, Sys 0 000000
- Total Remote Usage Usr 0 000000, Sys 0
000005 - 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 ...
40Uses for the User Log
- Easily read by human or machine
- C library and Perl Module for parsing UserLogs
is available - log_xmlTrue XML formatted
- Event triggers for meta-schedulers
- Like DagMan
- Visualizations of job progress
- Condor JobMonitor Viewer
41Condor JobMonitorScreenshot
42Job 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
lt128.105.165.341027gt - ID OWNER SUBMITTED RUN_TIME
ST PRI SIZE CMD - 1.0 frieda 6/16 0652 0000211
R 0 0.0 my_job - condor_prio 5 1.0
- condor_q
- -- Submitter perdita.cs.wisc.edu
lt128.105.165.341027gt - ID OWNER SUBMITTED RUN_TIME
ST PRI SIZE CMD - 1.0 frieda 6/16 0652 0000213
R 5 0.0 my_job
43Want other Scheduling possibilities?Use the
Scheduler Universe
- In addition to VANILLA, another job universe is
the Scheduler Universe. - Scheduler Universe jobs run on the submitting
machine and serve as a meta-scheduler. - DAGMan meta-scheduler included
44DAGMan
- 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., Dont run job B until job A has
completed successfully.)
45What 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!
46Defining a DAG
- A DAG is defined by a .dag file, 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
47Submitting 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 dont have to baby-sit it.
48Running a DAG
- DAGMan acts as a meta-scheduler, managing the
submission of your jobs to Condor based on the
DAG dependencies.
DAGMan
A
Condor Job Queue
.dag File
A
C
B
D
49Running a DAG (contd)
- DAGMan holds submits jobs to the Condor queue
at the appropriate times.
DAGMan
A
Condor Job Queue
B
C
B
C
D
50Running a DAG (contd)
- 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.
DAGMan
A
Condor Job Queue
Rescue File
X
B
D
51Recovering 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.
DAGMan
A
Condor Job Queue
Rescue File
C
B
C
D
52Recovering a DAG (contd)
- Once that job completes, DAGMan will continue the
DAG as if the failure never happened.
DAGMan
A
Condor Job Queue
C
B
D
D
53Finishing a DAG
- Once the DAG is complete, the DAGMan job itself
is finished, and exits.
DAGMan
A
Condor Job Queue
C
B
D
54Additional 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
55Another sample DAGMan submit file
- Filename diamond.dag
- Job A A.condor
- Job B B.condor
- Job C C.condor
- Job D D.condor
- Script PRE A top_pre.csh
- Script PRE B mid_pre.perl JOB
- Script POST B mid_post.perl JOB RETURN
- Script PRE C mid_pre.perl JOB
- Script POST C mid_post.perl JOB RETURN
- Script PRE D bot_pre.csh
- PARENT A CHILD B C
- PARENT B C CHILD D
- Retry C 3
56DAGMan, cont.
- DAGMan can help w/ visualization of the DAG
- Can create input files for ATTs graphviz
package (dot input). - Why not just use make?
- In the works dynamic DAGs.
57And Even Bigger744 Files, 387 Nodes
50
60
168
108
Argonne National Laboratory
58Weve 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 ?
59What if each job needed to run for 20 days?What
if I wanted to interrupt a job with a higher
priority job?
60Condors 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
61Process Checkpointing
- Condors 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 jobs source code
needed however, your job must be relinked with
Condors Standard Universe support library
62Relinking 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_comp
ile f77 -o myjob filea.f fileb.f OR condor_compile
make f MyMakefile
63Limitations in the Standard Universe
- Condors 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
64When 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
65Standalone Checkpointing
- Can use Condor Projects checkpoint technology
outside of Condor - SIGTSTP checkpoint and exit
- SIGUSR2 periodic checkpoint
condor_compile cc myapp.c o myapp myapp
-_condor_ckpt foo-image.ckpt myapp
-_condor_restart foo-image.ckpt
66Checkpoint Library Interface
- void init image with file name( char ckpt file
name ) - void init image with file descriptor( int fd )
- void ckpt()
- void ckpt and exit()
- void restart()
- void condor ckpt disable()
- void condor ckpt enable()
- int condor warning config( const char kind,const
char mode) - extern int condor compress ckpt
67What Condor Daemons are running on my machine,
and what do they do?
68Condor Daemon Layout
69condor_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
70condor_master (contd)
- Acts as the server for many Condor remote
administration commands - condor_reconfig, condor_restart, condor_off,
condor_on, condor_config_val, etc.
71condor_startd
- Represents a machine to the Condor system
- Responsible for starting, suspending, and
stopping jobs - Enforces the wishes of the machine owner (the
owners policy more on this soon)
72condor_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,
73condor_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)
74condor_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
others requirements
75Happy Day! Friedas 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
76(No Transcript)
77Layout of the Condor Pool
ClassAd Communication Pathway
78condor_status
condor_status Name OpSys Arch
State Activity LoadAv Mem
ActvtyTime haha.cs.wisc. IRIX65 SGI
Unclaimed Idle 0.198 192
0000004 antipholus.cs LINUX INTEL
Unclaimed Idle 0.020 511
0022842 coral.cs.wisc LINUX INTEL
Claimed Busy 0.990 511
0012721 doc.cs.wisc.e LINUX INTEL
Unclaimed Idle 0.260 511
0002004 dsonokwa.cs.w LINUX INTEL
Claimed Busy 0.810 511
0000145 ferdinand.cs. LINUX INTEL
Claimed Suspended 1.130 511
0000055 vm1_at_pinguino. LINUX INTEL
Unclaimed Idle 0.000 255
0010328 vm2_at_pinguino. LINUX INTEL
Unclaimed Idle 0.190 255 0010329
79Frieda tries out static parallel jobs MPI
Universe
- Schedule and start an MPICH job on dedicated
resources - MPI example submit description file
- universe MPI
- executable simplempi
- log logfile
- input infile.(NODE)
- output outfile.(NODE)
- error errfile.(NODE)
- machine_count 4
- queue
80The Boss says Frieda can add her co-workers
desktop machines into her Condor pool as
wellbut only if they can also submit jobs.
(Boss Fat Cat)
81Layout of the Condor Pool
ClassAd Communication Pathway
82Some of the machines in the Pool do not have
enough memory or scratch disk space to run my job!
83Specify Requirements!
- An expression (syntax similar to C or Java)
- Must evaluate to True for a match to be made
Universe vanilla Executable
my_job InitialDir run_(Process) Requirements
Memory gt 256 Disk gt 10000 Queue 600
84Specify Rank!
- All matches which meet the requirements can be
sorted by preference with a Rank expression. - Higher the Rank, the better the match
Universe vanilla Executable
my_job Arguments -arg1 arg2 InitialDir
run_(Process) Requirements Memory gt 256
Disk gt 10000 Rank (KFLOPS10000) Memory Queue
600
85What 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)
86Condor 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
87Sample ClassAd
- MyType "Machine"
- TargetType "Job"
- Machine "froth.cs.wisc.edu"
- Arch "INTEL"
- OpSys "SOLARIS251"
- Disk 35882
- Memory 128
- KeyboardIdle 173
- LoadAvg 0.1000
- Requirements TARGET.Owner"smith"
LoadAvglt0.3 KeyboardIdlegt1560
88ClassAds, cont.
- Attributes consist of
- An attribute name (case-insensitive!)
- An attribute value, composed of literals and/or
attribute references connected by operators.
Requirements KeyboardIdle gt 300
89ClassAds, cont.
- Literals
- Integers, Reals
- Booleans TRUE (1) and FALSE (0)
- Strings
- Enclosed in double quotations
- Use backslash (\) to escape
- Lastname \Smith\
- UNDEFINED (three-valued logic)
- Example Beefymachine is UNDEFINED if Memory
attribute does not exist - BeefyMachine Memory gt 1024
- ERROR
- Functions
- Can be supplied via a shared library
90ClassAds, cont
- Operators
- - (unary negation) (high precedence)
- /
- - (addition, subtraction)
- lt lt gt gt
- ! ? !
-
- (low precedence)
91ClassAds, cont.
- Meta-operators ? and !
- and ! can return True, False, Undefined, or
Error - ? and ! can return True or False think of
them like is identical and is not identical - Examples
- 10 UNDEFINED is UNDEFINED
- UNDEFINED UNDEFINED is UNDEFINED
- 10 ? UNDEFINED is FALSE
- UNDEFINED ? UNDEFINED is TRUE
92ClassAds, cont.
- Attribute References
- Scope Prefix?
- If the prefix is MY., the attribute is looked up
in ClassAd A. If the named attribute does not
exist in A, the value of the reference is
UNDEFINED. - If the prefix is TARGET., the attribute is looked
up in ClassAd B. If the named attribute does not
exist in B, the value of the reference is
UNDEFINED. - No scope prefix?
- First try ad A, then B. If it is not found in
either, then UNDEFINED. - Special attribute CurrentTime, which evaluates
to the integer Unix epoch time (number of seconds
since Jan 1st, 1970). - If the reference refers to an expression that is
itself in the process of being evaluated, there
is a circular dependency in the evaluation. The
value of the reference is ERROR.
93ClassAd 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).
94How can my jobs access their data files?
95Access to Data in Condor
- 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
- Remote I/O Proxy Socket
96Standard 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
97Job Startup
Startd
Schedd
Starter
Customer Job
Shadow
Condor Syscall Lib
Submit
98condor_q -io
c01(69) condor_q -io -- Submitter
c01.cs.wisc.edu lt128.105.146.1012996gt
c01.cs.wisc.edu ID OWNER READ
WRITE SEEK XPUT BUFSIZE BLKSIZE
72.3 edayton no i/o data collected
yet 72.5 edayton 6.8 MB 0.0 B
0 104.0 KB/s 512.0 KB 32.0 KB 73.0 edayton
6.4 MB 0.0 B 0 140.3 KB/s 512.0 KB
32.0 KB 73.2 edayton 6.8 MB 0.0 B
0 112.4 KB/s 512.0 KB 32.0 KB 73.4 edayton
6.8 MB 0.0 B 0 139.3 KB/s 512.0 KB
32.0 KB 73.5 edayton 6.8 MB 0.0 B
0 139.3 KB/s 512.0 KB 32.0 KB 73.7 edayton
no i/o data collected yet 0 jobs 0
idle, 0 running, 0 held
99Condor 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 vanilla Executable
my_job Requirements Memory gt 256 Disk gt
10000 Should_Transfer_Files IF_NEEDED When_To_Tr
ansfer_Output IF_NEEDED Transfer_input_files
dataset(Process), common.data Transfer_output_fil
es TheAnswer.dat Queue 600
100Remote I/O Socket
- Job can request that the condor_starter process
on the execute machine create a Remote I/O Proxy
Socket - Used for online access of file on submit machine
without Standard Universe. - Use in Vanilla, Java,
- Libraries provided for Java and for C, e.g.
- Java FileInputStream -gt ChirpInputStream
- C open() -gt chirp_open()
- Or use Parrot!
101starter
shadow
Secure Remote I/O
Local I/O (Chirp)
I/O Server
I/O Proxy
Fork
Local System Calls
Job
Home File System
I/O Library
Submission Site
Execution Site
102I am adding nodes to the Cluster but the
Engineering Department has priority on these
nodes.
Policy Configuration
(Boss Fat Cat)
103Machine Policy coming tomorrowOoohhhh the
suspense!
104The Cluster is fine. But not the desktop
machines. Condor can only use the desktops when
they would otherwise be idle.
Policy Configuration, cont
(Boss Fat Cat)
105Machine Policy coming tomorrowOoohhhh the
suspense!
106I want to use Java.Is there any easyway to run
Java programs via Condor?
107Java Universe Job
- universe java
- executable Main.class
- jar_files MyLibrary.jar
- input infile
- output outfile
- arguments Main 1 2 3
- queue
condor_submit
108Why 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.
109Java support, cont.
- condor_status -java
- Name JavaVendor Ver State
Activity LoadAv Mem - aish.cs.wisc. Sun Microsy 1.2.2 Owner Idle
0.000 249 - anfrom.cs.wis Sun Microsy 1.2.2 Owner Idle
0.030 249 - babe.cs.wisc. Sun Microsy 1.2.2 Claimed Busy
1.120 123 - ...
-
110My MPI programs are running on the dedicated
nodes.Can I run parallel jobs on the
non-dedicated nodes?
111PVM Universe
- Allows dynamic, opportunistic PVM
- Number of nodes can change dynamically
- Specify a minimum and maximum number of nodes
- Works well for Master/Worker paradigm
- Differences from regular PVM
- pvm_addhost() is non-blocking
- pvm_notify enhanced w/ suspend state
- PVM arch string enhanced
- Can also use MW does all the work for you.
112Non-dedicated Parallel Job PVM Universe, Cont.
- The job is a PVM universe job.
- universe PVM
- The executable of the master PVM program is
master.exe''. - executable master.exe
- input "in.dat"
- output "out.dat"
- error "err.dat"
- Machine class 0
- Requirements (Arch "INTEL") (OpSys
"LINUX") - We want at least 2 machines in class 0 before
starting the - program. We can use up to 4 machines.
- machine_count 2..4
- queue
- Machine class 1
- Requirements (Arch "SUN4x") (OpSys
"SOLARIS26") - We can use up to 50 more.
- machine_count 1..50
- queue
113General User Commands
- 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 Specify Dependencies
- condor_checkpoint Force a checkpoint
- condor_compile Link Condor library
114Administrator Commands
- 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
115CondorView Usage Graph
116Some of the command-line tools more in depth
condor_submit
- condor_submit options submit-file
- Some useful options
- -d Disable file permission checks
- -n ltschedd-namegt Submit to a specific schedd
- -v Verbose display Job Ads submitted
- Can read from stdin example
- cat myjob.sub condor_submit d
- is the same as
- condor_submit d myjob.sub
-
117Job Submit files Built-in and Defined Macros
- Macros are resolved by condor_submit before
creating the Job ClassAd. - Weve 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 - ltmacro_namegt ltstringgt
- and then used with the form (macro_name).
118Job Submit File Example
- Run foo mem 512 seed 012
-
- Universe vanilla
- Executable foo
- Memory 512
- MyHomeDir ENV(HOME)
- Requirements Memory gt (Memory)
- Arguments -mem (Memory) \
- -seed RANDOM_CHOICE(0,1,2)
- output log.(cluster).(process)
- Queue 100
119Sad factMacros improve your spelling.
- Consider this submit file
- Universe vanilla
- Executable foo
- Requirments Memory gt 512
- Out foo.out
- Err foo.err
- Queue
- Notice any problems?
- Hint stdout is still remapped to /dev/null
- stderr is still remapped to /dev/null
- the job may run on a 128meg machine
- And because of Macros, condor_submit will not
report any errors
120Job 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
- (attributestring_if_attribute_undefined)
121Example Submit File
- Run on Solaris or Linux
- Universe vanilla
- Requirements OpsysLinux Opsys
Solaris - Executable foo.(opsys)
- Arguments -textures (texturedir/usr/local/ali
as/textures) - queue
122Submit file general entries
- Universe Runtime environment (vanilla,
standard, scheduler, pvm, mpi, globus, ) - Executable Name of binary to run
- Input file to redirect as stdin, or the
keyboard (defaults to /dev/null) - Output file to redirect stdout (defaults to
/dev/null) - Error file to redirect stderr (defaults to
/dev/null) - Note do not use the same filename for output
error.
123Submit file File Transfer Mechanism options
-
- Should_Transfer_Files When_To_Transfer_Output
Transfer_input_files - Transfer_output_files
124Submit FileJob 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 ltexpressiongt
- on_exit_hold ltexpressiongt
- periodic_remove ltexpressiongt
- periodic_hold ltexpressiongt
- periodic_release ltexpressiongt
125Job 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 ((ExitBySignalFalse)
(ExitSignal ! 0)) ((CurrentTime
JobStartDate) lt 3600) - Place on hold if job has spent more than 50 of
its time suspended - periodic_hold CumulativeSuspensionTime gt
(RemoteWallClockTime / 2.0)
126Submit file Options to move the executable
- Copy_to_spool True False Defaults to be
True often not needed, and often slows down
submit considerably. - Transfer_executable True False Defaults to
be True could be wasteful if executable is
pre-staged on execute machine.
127Submit file Job Environment
- Environment varval var1val1
- Getenv True False Defaults to be false.
- Often GetEnvTRUE fixes problems due to an empty
environment, BUT - Be wary the submit machines 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.
128Submit file priority settings
- Nice_user true false - use a priority
factor of 1,000,000, so everyone can run ahead of
this job - Priority ltintgt - specify job prio ala
condor_prio - AccountingGroup foo - use a specified
accounting principle, instead of the user.
129How are user priorities handled in Condor?
130User Priorities
- A users effective priority determines their
usage - Like golf lower number is better
- Machines are allocated as an inverse ratio of
priority - Effective Priority Real Priority Priority
Factor - Real Priority Set by Condor
- Priority Factor Set by Administrator
131User Priorities, cont.
- To view user priority information, use
- condor_userprio all
- This will show info for all current users of
the system. To see the entire accounting
database, do - condor_userprio all allusers
- (see output)
132What is a negotiation cycle ?
133What happens if the workstation running the
Central Manager crashes?
134What happens if the workstation running my job
(execute machine) crashes?
135What happens if the workstation running my schedd
(submit machine) crashes?
136Disconnected 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 jobs submit
description file - JobLeaseDuration ltN secondsgt
- For example
- JobLeaseDuration 1200
137Why is my job not running?
138Troubleshooting 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.
139Back to the Story
Frieda Needs Remote Resources
140Frieda 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 flock to
these pools
141Condor Pool
Friendly Condor Pool
142How Flocking Works
- Add a line to your condor_config
- FLOCK_HOSTS Pool-Foo, Pool-Bar
Collector
Negotiator
Submit Machine
Central Manager (CONDOR_HOST)
Pool-Foo Central Manager
Pool-Bar Central Manager
Schedd
143Condor 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 pools local users can have priority over
remote users flocking in.
144Condor 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 Condors queue management
features for her Globus jobs! - She installs Condor-G so she can submit Globus
Universe jobs to Condor
145Condor-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
146Frieda 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
certificate - universe globus
- globusscheduler beak.cs.wisc.edu/jobmanager
- executable progname
- queue
147How It Works
Personal Condor
Globus Resource
Schedd
LSF
148How It Works
Personal Condor
Globus Resource
Schedd
LSF
149How It Works
Personal Condor
Globus Resource
Schedd
LSF
GridManager
150How It Works
Personal Condor
Globus Resource
JobManager
Schedd
LSF
GridManager
151How It Works
Personal Condor
Globus Resource
JobManager
Schedd
LSF
GridManager
User Job
152Condor Globus Universe
153Globus 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?
154Changes to the Globus JobManager for Fault
Tolerance
- Ability to restart a JobManager
- Enhanced two-phase commit submit protocol
155Globus 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
156Globus Universe Fault-ToleranceLost Contact
with Remote Jobmanager
Can we contact gatekeeper?
Yes - jobmanager crashed
No retry until we can talk to gatekeeper again
Can we reconnect to jobmanager?
No machine crashed or job completed
Yes network was down
Restart jobmanager
Has job completed?
No is job still running?
Yes update queue
157Globus 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 - Todo Interface with MyProxy
158But 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
159One 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
160Condor Pool
Friendly Condor Pool
161Local Condor Pool
Remote Condor Pool
162Match Maker
CondorSubmit X 2
Globus Resource
Gate Keeper
Customer AG
Grid Man
Job Manager
Local Job Scheduler
Glide in
Condor-G
163(No Transcript)
164GlideIn 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
165In Review
- With Condor-G Frieda can
- manage her compute job workload
- access remote compute resources on the Grid via
Globus Universe jobs - carve out her own personal Condor Pool from the
Grid with GlideIn technology
166Condor-G Matchmaking
- Alternative to Glidein Use Condor-G matchmaking
with globus universe jobs - Allows Condor-G to dynamically assign computing
jobs to grid sites - An example of lazy planning
167Condor-G Matchmaking, cont.
- Normally a globus universe job must specify the
site in the submit description file via the
globusscheduler attribute like so - Executable foo
- Universe globus
- Globusscheduler beak.cs.wisc.edu/jobmanager-pbs
- queue
168Condor-G Matchmaking, cont.
- With matchmaking, globus universe jobs can use
requirements and rank - Executable foo
- Universe globus
- Globusscheduler (GatekeeperUrl)
- Requirements arch LINUX
- Rank NumberOfNodes
- Queue
- The (x) syntax inserts information from the
target ClassAd when a match is made.
169Condor-G Matchmaking, cont.
- Where do these target ClassAds representing
Globus gatekeepers come from? Several options - Simple script on gatekeeper publishes an ad via
condor_advertise command-line utility (method
used by D0 JIM, USCMS) - Program to query Globus MDS and convert
information into ClassAd (method used by EDG) - Run HawkEye with appropriate plugins on the
gatekeeper - An explanation of Condor-G matchmaking setup see
http//www.cs.wisc.edu/condor/USCMS_matchmaking.ht
ml
170Some Recent Condor-G Features
- Condor-G can submit and manage jobs not only in
Condor and Globus managed grids, but also to - Nordugrid (http//www.nordugrid.org/)
- Oracle Database (using Oracle Call Interface
OCI API) - UNICORE
- PBS
- LSF
171Some recent or soon to arrive Condor-G / DAGMan
features, cont.
- Multi-Tier job submission
- Allows jobs to be submitted from a machine which
need not be always connected to the network (e.g.
a laptop) - condor_submit sends job Classad and job sandbox
to a remote condor_schedd - condor_fetch_sandbox used to retrieve output from
remote condor_schedd when job completes - SOAP interface
- Job submission to additional remote
- systems
- Full support for matchmaking
172I want to create a portal to Condor.Is there a
developer API to Condor?
173Developer API
- Do not underestimate the flexibility of the
command line tools! - Other possibilities
- Condor Perl Module
- DRMAA
- Condor GAHP
- Condor SOAP (Web Service) Interface
- ClassAd Library (C and Java)
174Thank you!