org.opensha.sra.calc.parallel
Class MPJ_EAL_Calc

java.lang.Object
  extended by org.opensha.commons.hpc.mpj.taskDispatch.MPJTaskCalculator
      extended by org.opensha.sra.calc.parallel.MPJ_EAL_Calc
All Implemented Interfaces:
CalculationExceptionHandler

public class MPJ_EAL_Calc
extends MPJTaskCalculator
implements CalculationExceptionHandler


Field Summary
protected  java.util.List<Asset> assets
           
static java.lang.String BATCH_ELEMENT_NAME
           
protected  ThreadedEALCalc calc
           
 
Fields inherited from class org.opensha.commons.hpc.mpj.taskDispatch.MPJTaskCalculator
D, df, rank, shuffle, size, TAG_NEW_BATCH, TAG_NEW_BATCH_LENGH, TAG_READY_FOR_BATCH
 
Constructor Summary
MPJ_EAL_Calc(org.apache.commons.cli.CommandLine cmd, Portfolio portfolio, Element el)
           
MPJ_EAL_Calc(org.apache.commons.cli.CommandLine cmd, Portfolio portfolio, Element el, java.io.File outputFile)
           
 
Method Summary
protected  void calculateBatch(int[] batch)
           
 void calculationException(java.lang.String errorMessage)
          Exceptions occur during a calculation; this method gets the program back to its start state
static org.apache.commons.cli.Options createOptions()
           
protected  void doFinalAssembly()
           
protected  int getNumTasks()
           
static void main(java.lang.String[] args)
           
protected  void registerResult(int index, double eal)
           
 
Methods inherited from class org.opensha.commons.hpc.mpj.taskDispatch.MPJTaskCalculator
abortAndExit, abortAndExit, abortAndExit, debug, debug, finalizeMPJ, getNumThreads, initMPJ, parse, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BATCH_ELEMENT_NAME

public static final java.lang.String BATCH_ELEMENT_NAME
See Also:
Constant Field Values

assets

protected java.util.List<Asset> assets

calc

protected ThreadedEALCalc calc
Constructor Detail

MPJ_EAL_Calc

public MPJ_EAL_Calc(org.apache.commons.cli.CommandLine cmd,
                    Portfolio portfolio,
                    Element el)
             throws java.io.IOException,
                    DocumentException,
                    java.lang.reflect.InvocationTargetException
Throws:
java.io.IOException
DocumentException
java.lang.reflect.InvocationTargetException

MPJ_EAL_Calc

public MPJ_EAL_Calc(org.apache.commons.cli.CommandLine cmd,
                    Portfolio portfolio,
                    Element el,
                    java.io.File outputFile)
             throws java.io.IOException,
                    DocumentException,
                    java.lang.reflect.InvocationTargetException
Throws:
java.io.IOException
DocumentException
java.lang.reflect.InvocationTargetException
Method Detail

getNumTasks

protected int getNumTasks()
Specified by:
getNumTasks in class MPJTaskCalculator

calculateBatch

protected void calculateBatch(int[] batch)
                       throws java.lang.Exception
Specified by:
calculateBatch in class MPJTaskCalculator
Throws:
java.lang.Exception

registerResult

protected void registerResult(int index,
                              double eal)

doFinalAssembly

protected void doFinalAssembly()
                        throws java.lang.Exception
Specified by:
doFinalAssembly in class MPJTaskCalculator
Throws:
java.lang.Exception

createOptions

public static org.apache.commons.cli.Options createOptions()

main

public static void main(java.lang.String[] args)

calculationException

public void calculationException(java.lang.String errorMessage)
Description copied from interface: CalculationExceptionHandler
Exceptions occur during a calculation; this method gets the program back to its start state

Specified by:
calculationException in interface CalculationExceptionHandler
Parameters:
errorMessage - The string representation of the exception's error message.