You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Deron Eriksson (JIRA)" <ji...@apache.org> on 2017/07/12 19:26:01 UTC

[jira] [Created] (SYSTEMML-1763) Fix Explain countCompiledInstructions for CP

Deron Eriksson created SYSTEMML-1763:
----------------------------------------

             Summary: 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


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)