[ 
https://issues.apache.org/jira/browse/HAMA-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462395#comment-13462395
 ] 

Yuesheng Hu commented on HAMA-648:
----------------------------------

hi edward,
Sorry for my mistake, it should be superstep + 1, not superstep - 1.

This is a little complicated, the return value of getSuperstepCount depend on 
where you use the method, before sync() the superstep is *S*, after sync() it 
is *S + 1*. So, in kmeansBSP, we should put the clause "if (maxIterations > 0 
&& maxIterations < peer.getSuperstepCount())" before sync() (also need before 
"assignCenters(peer)", otherwise, one additional "assignCenters(peer);" will 
execute. 

My opinion: the getSuperstepCount method can remain unchanged, but user have to 
take care of the position where you put the method(before sync() or after).
                
> Fix supercount in BSPPeer
> -------------------------
>
>                 Key: HAMA-648
>                 URL: https://issues.apache.org/jira/browse/HAMA-648
>             Project: Hama
>          Issue Type: Bug
>          Components: bsp core
>    Affects Versions: 0.5.0
>            Reporter: Yuesheng Hu
>            Assignee: Yuesheng Hu
>             Fix For: 0.6.0
>
>         Attachments: HAMA-648.patch
>
>
> Because super-step start with 0, so the superstep cout should be current 
> Superstep - 1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to