Class PMC
- java.lang.Object
-
- edu.isi.pegasus.planner.code.generator.Abstract
-
- edu.isi.pegasus.planner.code.generator.PMC
-
- All Implemented Interfaces:
CodeGenerator
public class PMC extends Abstract
This code generator generates a shell script in the submit directory. The shell script can be executed on the submit host to run the workflow locally.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description protected GridStartFactory
mGridStartFactory
The handle to the GridStart Factory.protected boolean
mInitializeGridStart
A boolean indicating whether grid start has been initialized or not.private PBS
mPBS
Handle to the PBS Code generator.-
Fields inherited from class edu.isi.pegasus.planner.code.generator.Abstract
mBag, mLogger, mPOptions, mProps, mSubmitFileDir
-
Fields inherited from interface edu.isi.pegasus.planner.code.CodeGenerator
VERSION
-
-
Constructor Summary
Constructors Constructor Description PMC()
The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<java.io.File>
generateCode(ADag dag)
Generates the code for the concrete workflow in the GRMS input format.void
generateCode(ADag dag, Job job)
Generates the code for a single job in the input format of the workflow executor being used.java.util.Map<java.lang.String,java.lang.String>
getAdditionalBraindumpEntries(ADag workflow)
Returns a Map containing additional braindump entries that are specific to a Code Generator.protected java.lang.String
getPathtoPMCFile(ADag dag)
Returns the basename for the pmc file for the dagvoid
initialize(PegasusBag bag)
Initializes the Code Generator implementation.protected java.lang.String
pmcBasename(ADag dag)
Returns the basename for the pmc file for the dag-
Methods inherited from class edu.isi.pegasus.planner.code.generator.Abstract
getDAGFilename, getDAGFilename, getFileBaseName, getWriter, reset, startMonitoring, writeOutBraindump, writeOutDAXReplicaStore, writeOutNotifications, writeOutStampedeEvents
-
-
-
-
Field Detail
-
mGridStartFactory
protected GridStartFactory mGridStartFactory
The handle to the GridStart Factory.
-
mInitializeGridStart
protected boolean mInitializeGridStart
A boolean indicating whether grid start has been initialized or not.
-
mPBS
private final PBS mPBS
Handle to the PBS Code generator.
-
-
Method Detail
-
initialize
public void initialize(PegasusBag bag) throws CodeGeneratorException
Initializes the Code Generator implementation.- Specified by:
initialize
in interfaceCodeGenerator
- Overrides:
initialize
in classAbstract
- Parameters:
bag
- the bag of initialization objects.- Throws:
CodeGeneratorException
- in case of any error occuring code generation.
-
generateCode
public java.util.Collection<java.io.File> generateCode(ADag dag) throws CodeGeneratorException
Generates the code for the concrete workflow in the GRMS input format. The GRMS input format is xml based. One XML file is generated per workflow.- Parameters:
dag
- the concrete workflow.- Returns:
- handle to the PMC file generated in the submit directory.
- Throws:
CodeGeneratorException
- in case of any error occuring code generation.
-
generateCode
public void generateCode(ADag dag, Job job) throws CodeGeneratorException
Generates the code for a single job in the input format of the workflow executor being used.- Parameters:
dag
- the dag of which the job is a part of.job
- theJob
object holding the information about that particular job.- Throws:
CodeGeneratorException
- in case of any error occuring code generation.
-
getAdditionalBraindumpEntries
public java.util.Map<java.lang.String,java.lang.String> getAdditionalBraindumpEntries(ADag workflow)
Returns a Map containing additional braindump entries that are specific to a Code Generator. The entries added for this are from the scheduler specific generator- Specified by:
getAdditionalBraindumpEntries
in classAbstract
- Parameters:
workflow
- the executable workflow- Returns:
- Map
-
pmcBasename
protected java.lang.String pmcBasename(ADag dag)
Returns the basename for the pmc file for the dag- Parameters:
dag
- the workflow- Returns:
- the basenmae
-
getPathtoPMCFile
protected java.lang.String getPathtoPMCFile(ADag dag)
Returns the basename for the pmc file for the dag- Parameters:
dag
- the workflow- Returns:
- the basenmae
-
-