Class GLite
- java.lang.Object
-
- edu.isi.pegasus.planner.code.generator.condor.style.Abstract
-
- edu.isi.pegasus.planner.code.generator.condor.style.GLite
-
- All Implemented Interfaces:
CondorStyle
- Direct Known Subclasses:
SSH
public class GLite extends Abstract
This implementation enables a job to be submitted via gLite to a grid sites. This is the style applied when job has a pegasus profile style key with value GLite associated with it.This style should only be used when the condor on the submit host can directly talk to scheduler running on the cluster. In Pegasus there should be a separate compute site that has this style associated with it. This style should not be specified for the local site. As part of applying the style to the job, this style adds the following classads expressions to the job description
batch_queue - value picked up from globus profile queue or can be set directly as a Condor profile named batch_queue +remote_cerequirements - See below
The remote CE requirements are constructed from the following profiles associated with the job.The profiles for a job are derived from various sources - user properties - transformation catalog - site catalog - DAX Note it is upto the user to specify these or a subset of them. The following globus profiles if associated with the job are picked up and translated to +remote_cerequirements key in the job submit files.
hostcount -> NODES xcount -> PROCS maxwalltime -> WALLTIME totalmemory -> TOTAL_MEMORY maxmemory -> PER_PROCESS_MEMORY
The following condor profiles if associated with the job are picked uppriority -> PRIORITY
All the env profiles are translated to MYENV For e.g. the expression in the submit file may look as+remote_cerequirements = "PROCS==18 && NODES==1 && PRIORITY==10 && WALLTIME==3600 && PASSENV==1 && JOBNAME==\"TEST JOB\" && MYENV ==\"MONTAGE_HOME=/usr/montage,JAVA_HOME=/usr\""
The pbs_local_attributes.sh file in share/pegasus/htcondor/glite picks up these values and translated to appropriate PBS parametersNODES -> nodes PROCS -> ppn WALLTIME -> walltime TOTAL_MEMORY -> mem PER_PROCESS_MEMORY -> pmem
All the jobs that have this style applied dont have a remote directory specified in the submit directory. They rely on kickstart to change to the working directory when the job is launched on the remote node.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONDOR_REMOTE_DIRECTORY_KEY
The Condor remote directory classad key to be used with Glitestatic java.lang.String
STYLE_NAME
The name of the style being implemented.-
Fields inherited from class edu.isi.pegasus.planner.code.generator.condor.style.Abstract
mCredentialFactory, mLogger, mProps, mSiteStore
-
Fields inherited from interface edu.isi.pegasus.planner.code.generator.condor.CondorStyle
VERSION
-
-
Constructor Summary
Constructors Constructor Description GLite()
The default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addSubExpression(java.lang.StringBuffer sb, java.lang.String key, java.lang.Integer value)
Adds a sub expression to a string bufferprotected void
addSubExpression(java.lang.StringBuffer sb, java.lang.String key, java.lang.String value)
Adds a sub expression to a string buffervoid
apply(Job job)
Applies the gLite style to the job.protected java.lang.String
getCERequirementsForJob(Job job)
Constructs the value for remote CE requirements expression for the job .protected java.lang.String
missingKeyError(Job job, java.lang.String key)
Constructs an error message in case of style mismatch.private java.lang.String
quote(java.lang.String string)
Condor Quotes a string-
Methods inherited from class edu.isi.pegasus.planner.code.generator.condor.style.Abstract
apply, applyCredentialsForJobSubmission, applyCredentialsForLocalExec, applyCredentialsForRemoteExec, complainForCredential, errorMessage, initialize
-
-
-
-
Field Detail
-
STYLE_NAME
public static final java.lang.String STYLE_NAME
The name of the style being implemented.- See Also:
- Constant Field Values
-
CONDOR_REMOTE_DIRECTORY_KEY
public static final java.lang.String CONDOR_REMOTE_DIRECTORY_KEY
The Condor remote directory classad key to be used with Glite- See Also:
- Constant Field Values
-
-
Method Detail
-
apply
public void apply(Job job) throws CondorStyleException
Applies the gLite style to the job.- Parameters:
job
- the job on which the style needs to be applied.- Throws:
CondorStyleException
- in case of any error occuring code generation.
-
getCERequirementsForJob
protected java.lang.String getCERequirementsForJob(Job job) throws CondorStyleException
Constructs the value for remote CE requirements expression for the job . For e.g. the expression in the submit file may look as+remote_cerequirements = "PROCS==18 && NODES==1 && PRIORITY==10 && WALLTIME==3600 && PASSENV==1 && JOBNAME==\"TEST JOB\" && MYENV ==\"GAURANG=MEHTA,KARAN=VAHI\""
The requirements are generated on the basis of certain profiles associated with the jobs. The following globus profiles if associated with the job are picked uphostcount -> NODES xcount -> PROCS maxwalltime -> WALLTIME totalmemory -> TOTAL_MEMORY maxmemory -> PER_PROCESS_MEMORY
The following condor profiles if associated with the job are picked uppriority -> PRIORITY
All the env profiles are translated to MYENV- Parameters:
job
-- Returns:
- the value to the expression and it is condor quoted
- Throws:
CondorStyleException
- in case of condor quoting error
-
addSubExpression
protected void addSubExpression(java.lang.StringBuffer sb, java.lang.String key, java.lang.String value)
Adds a sub expression to a string buffer- Parameters:
sb
- the StringBufferkey
- the keyvalue
- the value
-
addSubExpression
protected void addSubExpression(java.lang.StringBuffer sb, java.lang.String key, java.lang.Integer value)
Adds a sub expression to a string buffer- Parameters:
sb
- the StringBufferkey
- the keyvalue
- the value
-
missingKeyError
protected java.lang.String missingKeyError(Job job, java.lang.String key)
Constructs an error message in case of style mismatch.- Parameters:
job
- the job object.key
- the missing key
-
quote
private java.lang.String quote(java.lang.String string) throws CondorStyleException
Condor Quotes a string- Parameters:
string
- the string to be quoted.- Returns:
- quoted string.
- Throws:
CondorStyleException
- in case of condor quoting error
-
-