[ 
https://issues.apache.org/jira/browse/SYSTEMML-1763?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Deron Eriksson resolved SYSTEMML-1763.
--------------------------------------
       Resolution: Fixed
    Fix Version/s: SystemML 1.0

Fixed by [PR569|https://github.com/apache/systemml/pull/569].

> Fix Explain countCompiledInstructions for CP
> --------------------------------------------
>
>                 Key: SYSTEMML-1763
>                 URL: https://issues.apache.org/jira/browse/SYSTEMML-1763
>             Project: SystemML
>          Issue Type: Bug
>            Reporter: Deron Eriksson
>            Assignee: Deron Eriksson
>            Priority: Minor
>             Fix For: SystemML 1.0
>
>
> The counts.numCPInst++ in the countCompiledInstructions method of the Explain 
> class should be incremented based on the boolean CP parameter, not the 
> boolean SP parameter.
> {code}
>       private static int countCompiledInstructions( ArrayList<Instruction> 
> instSet, ExplainCounts counts, boolean MR, boolean CP, boolean SP )
>       {
>               int ret = 0;
>               
>               for( Instruction inst : instSet )
>               {
>                       if( MR && inst instanceof MRJobInstruction ) 
>                               counts.numJobs++;
>                       else if( SP && inst instanceof CPInstruction )
>                               counts.numCPInst++;
>                       else if( SP && inst instanceof SPInstruction )
>                               counts.numJobs++;
>                       
>                       //keep track of reblocks (in order to prevent 
> unnecessary spark context creation)
>                       if( SP && (inst instanceof CSVReblockSPInstruction || 
> inst instanceof ReblockSPInstruction) )
>                               counts.numReblocks++;
>               }
>               
>               return ret;
>       }
> {code}
> Also, the return value is irrelevant so the method return type should be 
> changed to void and ret should be removed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to