You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by ba...@apache.org on 2020/08/25 07:22:16 UTC

[systemds] branch master updated: [MINOR] Debug print reading

This is an automated email from the ASF dual-hosted git repository.

baunsgaard pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git


The following commit(s) were added to refs/heads/master by this push:
     new 7d2e6bb  [MINOR] Debug print reading
7d2e6bb is described below

commit 7d2e6bb7e6005637e9afc4c02d3fda5ae0bf34ec
Author: baunsgaard <ba...@tugraz.at>
AuthorDate: Mon Aug 24 16:59:26 2020 +0200

    [MINOR] Debug print reading
    
    This commit adds a debug print in reading from file to detect if the
    reading is done in parallel.
    
    Also in this commit the delay for worker startup in federated tests is
    increased to 2 sec from 1 sec.
---
 .../org/apache/sysds/runtime/io/MatrixReaderFactory.java | 16 +++++++++++++---
 .../java/org/apache/sysds/test/AutomatedTestBase.java    |  2 +-
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/sysds/runtime/io/MatrixReaderFactory.java b/src/main/java/org/apache/sysds/runtime/io/MatrixReaderFactory.java
index 7e46415..65df7d8 100644
--- a/src/main/java/org/apache/sysds/runtime/io/MatrixReaderFactory.java
+++ b/src/main/java/org/apache/sysds/runtime/io/MatrixReaderFactory.java
@@ -19,19 +19,25 @@
 
 package org.apache.sysds.runtime.io;
 
-import org.apache.sysds.conf.ConfigurationManager;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.sysds.common.Types.FileFormat;
 import org.apache.sysds.conf.CompilerConfig.ConfigType;
+import org.apache.sysds.conf.ConfigurationManager;
 import org.apache.sysds.runtime.DMLRuntimeException;
 import org.apache.sysds.runtime.data.SparseBlock;
 import org.apache.sysds.runtime.matrix.data.MatrixBlock;
 
-public class MatrixReaderFactory 
-{
+public class MatrixReaderFactory {
+	private static final Log LOG = LogFactory.getLog(MatrixReaderFactory.class.getName());
 	public static MatrixReader createMatrixReader(FileFormat fmt) {
 		MatrixReader reader = null;
 		boolean par = ConfigurationManager.getCompilerConfigFlag(ConfigType.PARALLEL_CP_READ_TEXTFORMATS);
 		boolean mcsr = MatrixBlock.DEFAULT_SPARSEBLOCK == SparseBlock.Type.MCSR;
+
+		if (LOG.isDebugEnabled()){
+			LOG.debug("reading parallel: " + par + " mcsr: " + mcsr);
+		}
 		
 		switch(fmt) {
 			case TEXT:
@@ -72,6 +78,10 @@ public class MatrixReaderFactory
 		boolean par = ConfigurationManager.getCompilerConfigFlag(ConfigType.PARALLEL_CP_READ_TEXTFORMATS);
 		boolean mcsr = MatrixBlock.DEFAULT_SPARSEBLOCK == SparseBlock.Type.MCSR;
 		
+		if (LOG.isDebugEnabled()){
+			LOG.debug("reading parallel: " + par + " mcsr: " + mcsr);
+		}
+
 		switch(fmt) {
 			case TEXT:
 			case MM:
diff --git a/src/test/java/org/apache/sysds/test/AutomatedTestBase.java b/src/test/java/org/apache/sysds/test/AutomatedTestBase.java
index 7bca262..9951982 100644
--- a/src/test/java/org/apache/sysds/test/AutomatedTestBase.java
+++ b/src/test/java/org/apache/sysds/test/AutomatedTestBase.java
@@ -101,7 +101,7 @@ public abstract class AutomatedTestBase {
 	public static final boolean TEST_GPU = false;
 	public static final double GPU_TOLERANCE = 1e-9;
 
-	public static final int FED_WORKER_WAIT = 1000; // in ms
+	public static final int FED_WORKER_WAIT = 2000; // in ms
 
 	// With OpenJDK 8u242 on Windows, the new changes in JDK are not allowing
 	// to set the native library paths internally thus breaking the code.