[
https://issues.apache.org/jira/browse/HAMA-648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462569#comment-13462569
]
Yuesheng Hu commented on HAMA-648:
----------------------------------
If I put the peer.getSuperstepCount() before peer.sync(), like this:
{code}
for (int i = 0; i < 5; i++) {
System.out.println("Before sync(), getSuperstepCount: "
+ peer.getSuperstepCount());
peer.sync();
}
{code}
The output is:
{code}
INFO: Running job: job_localrunner_0001
Sep 25, 2012 4:34:31 PM org.apache.hama.bsp.LocalBSPRunner$LocalSyncClient init
INFO: Setting up a new barrier for 1 tasks!
Before sync(), getSuperstepCount: 0
Before sync(), getSuperstepCount: 1
Before sync(), getSuperstepCount: 2
Before sync(), getSuperstepCount: 3
Before sync(), getSuperstepCount: 4
Sep 25, 2012 4:34:34 PM org.apache.hama.bsp.BSPJobClient monitorAndPrintJob
INFO: Current supersteps number: 4
Sep 25, 2012 4:34:34 PM org.apache.hama.bsp.BSPJobClient monitorAndPrintJob
INFO: The total number of supersteps: 4
Sep 25, 2012 4:34:34 PM org.apache.hama.bsp.Counters log
{code}
else if put the peer.getSuperstepCount() after peer.sync(),
{code}
for (int i = 0; i < 5; i++) {
peer.sync();
System.out.println("Before sync(), getSuperstepCount: "
+ peer.getSuperstepCount());
}
{code}
The output is:
{code}
INFO: Running job: job_localrunner_0001
Sep 25, 2012 4:36:21 PM org.apache.hama.bsp.LocalBSPRunner$LocalSyncClient init
INFO: Setting up a new barrier for 1 tasks!
After sync(), getSuperstepCount: 1
After sync(), getSuperstepCount: 2
After sync(), getSuperstepCount: 3
After sync(), getSuperstepCount: 4
After sync(), getSuperstepCount: 5
Sep 25, 2012 4:36:24 PM org.apache.hama.bsp.BSPJobClient monitorAndPrintJob
INFO: Current supersteps number: 4
Sep 25, 2012 4:36:24 PM org.apache.hama.bsp.BSPJobClient monitorAndPrintJob
INFO: The total number of supersteps: 4
Sep 25, 2012 4:36:24 PM org.apache.hama.bsp.Counters log
{code}
Test run without HAMA-648.patch. It looks like puting peer.getSuperstepCount()
before peer.sync() is consistent with the Counter
> 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