Class ParForProgramBlock

  • All Implemented Interfaces:
    ParseInfo

    public class ParForProgramBlock
    extends ForProgramBlock
    The ParForProgramBlock has the same execution semantics as a ForProgamBlock but executes the independent iterations in parallel. See ParForStatementBlock for the loop dependency analysis. At runtime level, iterations are guaranteed to be completely independent. NEW FUNCTIONALITIES TODO: reduction variables (operations: +=, -=, /=, *=, min, max) TODO: papply(A,1:2,FUN) language construct (compiled to ParFOR) via DML function repository => modules OK, but second-order functions required
    • Field Detail

      • USE_RANGE_TASKS_IF_USEFUL

        public static final boolean USE_RANGE_TASKS_IF_USEFUL
        See Also:
        Constant Field Values
      • USE_STREAMING_TASK_CREATION

        public static final boolean USE_STREAMING_TASK_CREATION
        See Also:
        Constant Field Values
      • ALLOW_NESTED_PARALLELISM

        public static final boolean ALLOW_NESTED_PARALLELISM
        See Also:
        Constant Field Values
      • CONVERT_NESTED_REMOTE_PARFOR

        public static final boolean CONVERT_NESTED_REMOTE_PARFOR
        See Also:
        Constant Field Values
      • USE_PARALLEL_RESULT_MERGE

        public static final boolean USE_PARALLEL_RESULT_MERGE
        See Also:
        Constant Field Values
      • USE_PARALLEL_RESULT_MERGE_REMOTE

        public static final boolean USE_PARALLEL_RESULT_MERGE_REMOTE
        See Also:
        Constant Field Values
      • CREATE_UNSCOPED_RESULTVARS

        public static final boolean CREATE_UNSCOPED_RESULTVARS
        See Also:
        Constant Field Values
      • ALLOW_REUSE_PARTITION_VARS

        public static boolean ALLOW_REUSE_PARTITION_VARS
      • WRITE_REPLICATION_FACTOR

        public static final int WRITE_REPLICATION_FACTOR
        See Also:
        Constant Field Values
      • MAX_RETRYS_ON_ERROR

        public static int MAX_RETRYS_ON_ERROR
      • FORCE_CP_ON_REMOTE_SPARK

        public static final boolean FORCE_CP_ON_REMOTE_SPARK
        See Also:
        Constant Field Values
      • RESET_RECOMPILATION_FLAGs

        public static final boolean RESET_RECOMPILATION_FLAGs
        See Also:
        Constant Field Values
      • ALLOW_BROADCAST_INPUTS

        public static boolean ALLOW_BROADCAST_INPUTS
    • Constructor Detail

      • ParForProgramBlock

        public ParForProgramBlock​(int ID,
                                  Program prog,
                                  String iterPredVar,
                                  HashMap<String,​String> params,
                                  ArrayList<ParForStatementBlock.ResultVar> resultVars)
        ParForProgramBlock constructor. It reads the specified parameter settings, where defaults for non-specified parameters have been set in ParForStatementBlock.validate(). Furthermore, it generates the IDs for the ParWorkers.
        Parameters:
        ID - parfor program block id
        prog - runtime program
        iterPredVar - ?
        params - map of parameters
        resultVars - list of result variable names
    • Method Detail

      • resetWorkerIDs

        public static void resetWorkerIDs()
      • getID

        public long getID()
      • getParForParam

        public String getParForParam​(String key)
      • disableOptimization

        public void disableOptimization()
      • getDegreeOfParallelism

        public int getDegreeOfParallelism()
      • setDegreeOfParallelism

        public void setDegreeOfParallelism​(int k)
      • isDegreeOfParallelismFixed

        public boolean isDegreeOfParallelismFixed()
      • setDegreeOfParallelismFixed

        public void setDegreeOfParallelismFixed​(boolean flag)
      • setCPCaching

        public void setCPCaching​(boolean flag)
      • setRuntimePiggybacking

        public void setRuntimePiggybacking​(boolean flag)
      • setTaskSize

        public void setTaskSize​(long tasksize)
      • enableColocatedPartitionedMatrix

        public void enableColocatedPartitionedMatrix​(String varname)
      • setTransposeSparseColumnVector

        public void setTransposeSparseColumnVector​(boolean flag)
      • setPartitionReplicationFactor

        public void setPartitionReplicationFactor​(int rep)
      • setExportReplicationFactor

        public void setExportReplicationFactor​(int rep)
      • disableJVMReuse

        public void disableJVMReuse()
      • setRecompileMemoryBudget

        public void setRecompileMemoryBudget​(double localMem)
      • setSparkRepartitionVariables

        public void setSparkRepartitionVariables​(Collection<String> vars)
      • getSparkRepartitionVariables

        public Collection<String> getSparkRepartitionVariables()
      • setSparkEagerCacheVariables

        public void setSparkEagerCacheVariables​(Collection<String> vars)
      • getNumIterations

        public long getNumIterations()
      • hasFunctions

        public boolean hasFunctions()