Repository: systemml Updated Branches: refs/heads/master cc349dc88 -> ebfe327e4
[SYSTEMML-2389] Fix paramserv calculation of iterations per worker Closes #785. Project: http://git-wip-us.apache.org/repos/asf/systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/ebfe327e Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/ebfe327e Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/ebfe327e Branch: refs/heads/master Commit: ebfe327e4474d0692679efc847216131d38777e8 Parents: cc349dc Author: EdgarLGB <[email protected]> Authored: Wed Jun 13 17:00:55 2018 -0700 Committer: Matthias Boehm <[email protected]> Committed: Wed Jun 13 17:00:55 2018 -0700 ---------------------------------------------------------------------- .../runtime/controlprogram/paramserv/LocalPSWorker.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/systemml/blob/ebfe327e/src/main/java/org/apache/sysml/runtime/controlprogram/paramserv/LocalPSWorker.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/paramserv/LocalPSWorker.java b/src/main/java/org/apache/sysml/runtime/controlprogram/paramserv/LocalPSWorker.java index f9c2a00..a64df72 100644 --- a/src/main/java/org/apache/sysml/runtime/controlprogram/paramserv/LocalPSWorker.java +++ b/src/main/java/org/apache/sysml/runtime/controlprogram/paramserv/LocalPSWorker.java @@ -42,7 +42,7 @@ public class LocalPSWorker extends PSWorker implements Callable<Void> { public Void call() throws Exception { try { long dataSize = _features.getNumRows(); - int totalIter = (int) Math.ceil(dataSize / _batchSize); + int totalIter = (int) Math.ceil((double) dataSize / _batchSize); switch (_freq) { case BATCH: @@ -141,9 +141,10 @@ public class LocalPSWorker extends PSWorker implements Callable<Void> { _ec.setVariable(Statement.PS_LABELS, bLabels); if (LOG.isDebugEnabled()) { - LOG.debug(String.format("Local worker_%d: Got batch data [size:%d kb] of index from %d to %d. " - + "[Epoch:%d Total epoch:%d Iteration:%d Total iteration:%d]", _workerID, bFeatures.getDataSize() - / 1024 + bLabels.getDataSize() / 1024, begin, end, i + 1, _epochs, j + 1, totalIter)); + LOG.debug(String.format("Local worker_%d: Got batch data [size:%d kb] of index from %d to %d [last index: %d]. " + + "[Epoch:%d Total epoch:%d Iteration:%d Total iteration:%d]", _workerID, + bFeatures.getDataSize() / 1024 + bLabels.getDataSize() / 1024, begin, end, dataSize, i + 1, _epochs, + j + 1, totalIter)); } // Invoke the update function
