systemml-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deron Eriksson (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (SYSTEMML-1763) Fix Explain countCompiledInstructions for CP
Date Thu, 13 Jul 2017 01:33:00 GMT

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

Deron Eriksson closed SYSTEMML-1763.
------------------------------------

> 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)

Mime
View raw message