You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by mb...@apache.org on 2021/08/05 11:59:27 UTC

[systemds] branch master updated: [SYSTEMDS-2832] Cleanup algorithm-level perftest (via builtin functions)

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

mboehm7 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 6bafd48  [SYSTEMDS-2832] Cleanup algorithm-level perftest (via builtin functions)
6bafd48 is described below

commit 6bafd48588ca1b5d2bddf2f01e2c2677930102b1
Author: David Sandru <sa...@student.tugraz.at>
AuthorDate: Thu Aug 5 13:29:32 2021 +0200

    [SYSTEMDS-2832] Cleanup algorithm-level perftest (via builtin functions)
    
    AMLS project SS2021.
    Closes #1357.
---
 .gitignore                                         |  5 +-
 scripts/perftest/CHANGES.md                        | 57 +++++++++++++++
 scripts/perftest/MatrixMult.sh                     | 37 +++++-----
 scripts/perftest/MatrixTranspose.sh                | 37 +++++-----
 scripts/perftest/README.md                         | 14 ++--
 .../perftest/conf/{mkl.xml => SystemDS-config.xml} |  5 +-
 scripts/perftest/conf/log4j-off.properties         |  0
 scripts/perftest/conf/mkl.xml                      |  0
 scripts/perftest/conf/openblas.xml                 |  0
 scripts/perftest/conf/std.xml                      |  0
 scripts/perftest/genBinomialData.sh                | 59 +++++++++++++++
 .../genMultinomialData.sh                          | 29 +++-----
 scripts/perftest/runAll.sh                         | 49 ++++++++++++-
 .../runAllBinomial.sh                              | 29 +++++---
 .../runAllMultinomial.sh                           | 39 +++++-----
 .../runAllRegression.sh                            | 39 ++++++----
 .../runGLM_binomial_probit.sh                      | 33 +++++----
 .../runGLM_gamma_log.sh                            | 33 +++++----
 .../runGLM_poisson_log.sh                          | 33 +++++----
 .../runMSVM.sh => perftest/runL2SVM.sh}            | 35 +++++----
 .../runLinearRegCG.sh                              | 30 +++++---
 .../runLinearRegDS.sh                              | 30 +++++---
 .../runL2SVM.sh => perftest/runMSVM.sh}            | 34 +++++----
 .../runMultiLogReg.sh                              | 44 +++++------
 .../runNaiveBayes.sh                               | 31 +++++---
 scripts/perftest/scripts/GLM.dml                   | 49 +++++++++++++
 .../{runAll.sh => scripts/LinearRegCG.dml}         | 17 +++--
 .../{runAll.sh => scripts/LinearRegDS.dml}         | 15 ++--
 scripts/perftest/scripts/MM.dml                    |  0
 .../{runAll.sh => scripts/MultiLogReg.dml}         | 20 +++--
 .../scripts}/changeFormat.dml                      |  2 +-
 .../scripts}/extractTestData.dml                   | 10 ++-
 scripts/perftest/scripts/l2-svm-predict.dml        | 85 ++++++++++++++++++++++
 scripts/perftest/scripts/m-svm-predict.dml         | 69 ++++++++++++++++++
 scripts/perftest/{runAll.sh => scripts/m-svm.dml}  | 20 +++--
 scripts/perftest/scripts/naive-bayes-predict.dml   | 71 ++++++++++++++++++
 .../{runAll.sh => scripts/naive-bayes.dml}         | 17 +++--
 scripts/perftest/scripts/transpose.dml             |  2 +-
 .../todo}/genClusteringData.sh                     |  0
 .../todo}/genDescriptiveStatisticsData.sh          |  0
 .../todo}/genDimensionReductionData.sh             |  0
 .../todo}/genRandLogRegData_LTStats.sh             |  0
 .../todo}/genStratStatisticsData.sh                |  0
 .../todo}/genTreeData.sh                           |  0
 .../todo}/runAllClustering.sh                      |  0
 .../todo}/runAllDimensionReduction.sh              |  0
 .../todo}/runAllStats.sh                           |  0
 .../todo}/runAllTrees.sh                           |  0
 .../todo}/runBivarStats.sh                         |  0
 .../todo}/runDecTree.sh                            |  0
 .../todo}/runKmeans.sh                             |  0
 .../todo}/runPCA.sh                                |  0
 .../todo}/runRandTree.sh                           |  0
 .../todo}/runStratStats.sh                         |  0
 .../todo}/runUnivarStats.sh                        |  0
 scripts/perftestDeprecated/README.md               | 53 --------------
 scripts/perftestDeprecated/genBinomialData.sh      | 71 ------------------
 scripts/perftestDeprecated/runAll.sh               | 49 -------------
 58 files changed, 810 insertions(+), 442 deletions(-)

diff --git a/.gitignore b/.gitignore
index 227fabd..a3e9d1c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -113,4 +113,7 @@ src/main/cpp/bin
 
 # Performance Test artifacts
 scripts/perftest/results
-scripts/perftest/in
\ No newline at end of file
+scripts/perftest/logs
+scripts/perftest/in
+scripts/perftest/scratch_space
+scripts/perftest/temp
\ No newline at end of file
diff --git a/scripts/perftest/CHANGES.md b/scripts/perftest/CHANGES.md
new file mode 100755
index 0000000..a71c9db
--- /dev/null
+++ b/scripts/perftest/CHANGES.md
@@ -0,0 +1,57 @@
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% end comment %}
+-->
+
+# New additions to the performance test suite
+Most of the new files were copied from the deprecated performance test suite (scripts/perftestDeprecated) and refactored to call SystemDS with additional configuration.
+Most of the new DML scripts were copied from scripts/algorithms to scripts/perftest/scripts and then adapted to use built-in functions, if available.
+
+### General changes of perftest and the refactored files moved from perftestDeprecated to perftest
+- Added line for intel oneapi MKL system variable initialization in the matrixmult script. The initialization is commented for now, as it would be executed by the runAll.sh.
+- Added commented initialization for MKL system variables in the runAll.sh. 
+- By default, shell scripts can now be invoked without any additional parameters, but optional arguments can be given for output folder and the command to be ran (MR, SPARK, ECHO).
+- Added SystemDS-config.xml in the perftest/conf folder, which is used by all refactored perftest scripts.
+- times.txt was moved to the "results" folder in perftest.
+- Time measurements appended to results/times.txt are now additionally measured in microseconds instead of just seconds, for the smaller data benchmarks.
+- All DML scripts, that are ultimately called by the microbenchmarks, can be found in perftest/scripts. This excludes the original algorithmic scripts that are still in use, if there was no corresponding built-in function.
+- Removed the -explain flag from all systemds calls.
+
+### Bash scripts that now call a new DML script that makes use of a built-in function, instead of a fully implemented algorithm
+- perftest/runMultiLogReg.sh -> perftest/scripts/MultiLogReg.dml
+- perftest/runL2SVM.sh -> perftest/scripts/l2-svm-predict.dml
+- perftest/runMSVM.sh -> perftest/scripts/m-svm.dml
+- perftest/runMSVM.sh -> perftest/scripts/m-svm-predict.dml
+- perftest/runNaiveBayes.sh -> perftest/scripts/naive-bayes.dml
+- perftest/runNaiveBayes.sh -> perftest/scripts/naive-bayes-predict.dml
+- perftest/runLinearRegCG.sh -> perftest/scripts/LinearRegCG.dml
+- perftest/runLinearRegDS.sh -> perftest/scripts/LinearRegDS.dml
+- perftest/runGLM_poisson_log.sh -> perftest/scripts/GLM.dml
+- perftest/runGLM_gamma_log.sh -> perftest/scripts/GLM.dml
+- perftest/runGLM_binomial_probit.sh -> perftest/scripts/GLM.dml
+
+
+### Bash scripts still calling old DML scripts, which fully implement algorithms
+- perftest/runMultiLogReg.sh -> algorithms/GLM-predict.dml
+- perftest/runLinearRegCG.sh -> algorithms/GLM-predict.dml
+- perftest/runLinearRegDS.sh -> algorithms/GLM-predict.dml
+- perftest/runGLM_poisson_log.sh -> algorithms/GLM-predict.dml
+- perftest/runGLM_gamma_log.sh -> algorithms/GLM-predict.dml
+- perftest/runGLM_binomial_probit.sh -> algorithms/GLM-predict.dml
+
+### Bash scripts that already did call a DML script with a single built-in functions (only needed some refactoring)
+- perftest/runL2SVM.sh -> algorithms/l2-svm.dml (This already uses the built-in function l2svm!)
\ No newline at end of file
diff --git a/scripts/perftest/MatrixMult.sh b/scripts/perftest/MatrixMult.sh
index add9d66..6bb5e33 100755
--- a/scripts/perftest/MatrixMult.sh
+++ b/scripts/perftest/MatrixMult.sh
@@ -21,45 +21,48 @@
 #-------------------------------------------------------------
 
 # Import MKL
-if [ -d ~/intel ] && [ -d ~/intel/bin ] && [ -f ~/intel/bin/compilervars.sh ]; then
-    . ~/intel/bin/compilervars.sh intel64
-else
-    . /opt/intel/bin/compilervars.sh intel64
-fi
+#if [ -d ~/intel ] && [ -d ~/intel/bin ] && [ -f ~/intel/bin/compilervars.sh ]; then
+#    . ~/intel/bin/compilervars.sh intel64
+#elif [ -d ~/intel ] && [ -d ~/intel/oneapi ] && [ -f ~/intel/oneapi/setvars.sh ]; then
+#	# For the new intel oneAPI
+#    . ~/intel/oneapi/setvars.sh intel64
+#else
+#    . /opt/intel/bin/compilervars.sh intel64
+#fi
 
 # Set properties
-export LOG4JPROP='scripts/perftest/conf/log4j-off.properties'
-export SYSDS_QUIET=1
-export SYSTEMDS_ROOT=$(pwd)
-export PATH=$SYSTEMDS_ROOT/bin:$PATH
+#export LOG4JPROP='scripts/perftest/conf/log4j-off.properties'
+#export SYSDS_QUIET=1
+#export SYSTEMDS_ROOT=$(pwd)
+#export PATH=$SYSTEMDS_ROOT/bin:$PATH
 
 
 
 # Logging output
-LogName='scripts/perftest/results/MM.log'
-mkdir -p 'scripts/perftest/results'
+LogName='results/MM.log'
+mkdir -p 'results'
 rm -f $LogName
 
 # Baseline
 perf stat -d -d -d -r 5 \
-    systemds scripts/perftest/scripts/MM.dml \
-    -config scripts/perftest/conf/std.xml \
+    systemds scripts/MM.dml \
+    -config conf/std.xml \
     -stats \
     -args 5000 5000 5000 1.0 1.0 3 \
     >>$LogName 2>&1
 
 # MKL
 perf stat -d -d -d -r 5 \
-    systemds scripts/perftest/scripts/MM.dml \
-    -config scripts/perftest/conf/mkl.xml \
+    systemds scripts/MM.dml \
+    -config conf/mkl.xml \
     -stats \
     -args 5000 5000 5000 1.0 1.0 3 \
     >>$LogName 2>&1
 
 # Open Blas
 perf stat -d -d -d -r 5 \
-    systemds scripts/perftest/scripts/MM.dml \
-    -config scripts/perftest/conf/openblas.xml \
+    systemds scripts/MM.dml \
+    -config conf/openblas.xml \
     -stats \
     -args 5000 5000 5000 1.0 1.0 3 \
     >>$LogName 2>&1
diff --git a/scripts/perftest/MatrixTranspose.sh b/scripts/perftest/MatrixTranspose.sh
index 151d53a..90db557 100755
--- a/scripts/perftest/MatrixTranspose.sh
+++ b/scripts/perftest/MatrixTranspose.sh
@@ -21,14 +21,15 @@
 #-------------------------------------------------------------
 
 # Set properties
-export LOG4JPROP='scripts/perftest/conf/log4j-off.properties'
-export SYSDS_QUIET=1
-export SYSTEMDS_ROOT=$(pwd)
-export PATH=$SYSTEMDS_ROOT/bin:$PATH
+#export LOG4JPROP='scripts/perftest/conf/log4j-off.properties'
+#export SYSDS_QUIET=1
+#export SYSTEMDS_ROOT=$(pwd)
+#export PATH=$SYSTEMDS_ROOT/bin:$PATH
 
-export SYSTEMDS_STANDALONE_OPTS="-Xmx20g -Xms20g -Xmn2000m"
+# export SYSTEMDS_STANDALONE_OPTS="-Xmx20g -Xms20g -Xmn2000m"
+export SYSTEMDS_STANDALONE_OPTS="-Xmx10g -Xms10g -Xmn2000m"
 
-mkdir -p 'scripts/perftest/results'
+mkdir -p 'results'
 
 repeatScript=5
 methodRepeat=5
@@ -36,13 +37,13 @@ sparsities=("1.0 0.1")
 
 for s in $sparsities; do
 
-    LogName="scripts/perftest/results/transpose-skinny-$s.log"
+    LogName="results/transpose-skinny-$s.log"
     rm -f $LogName
 
     # Baseline
     perf stat -d -d -d -r $repeatScript \
-        systemds scripts/perftest/scripts/transpose.dml \
-        -config scripts/perftest/conf/std.xml \
+        systemds scripts/transpose.dml \
+        -config conf/std.xml \
         -stats \
         -args 2500000 50 $s $methodRepeat \
         >>$LogName 2>&1
@@ -50,13 +51,13 @@ for s in $sparsities; do
     echo $LogName
     cat $LogName | grep -E '  r. |Total elapsed time|-----------| instructions |  cycles | CPUs utilized ' | tee $LogName.log
 
-    LogName="scripts/perftest/results/transpose-wide-$s.log"
+    LogName="results/transpose-wide-$s.log"
     rm -f $LogName
 
     # Baseline
     perf stat -d -d -d -r $repeatScript \
-        systemds scripts/perftest/scripts/transpose.dml \
-        -config scripts/perftest/conf/std.xml \
+        systemds scripts/transpose.dml \
+        -config conf/std.xml \
         -stats \
         -args 50 2500000 $s $methodRepeat \
         >>$LogName 2>&1
@@ -64,13 +65,13 @@ for s in $sparsities; do
     echo $LogName
     cat $LogName | grep -E '  r. |Total elapsed time|-----------| instructions |  cycles | CPUs utilized ' | tee $LogName.log
 
-    LogName="scripts/perftest/results/transpose-full-$s.log"
+    LogName="results/transpose-full-$s.log"
     rm -f $LogName
 
     # Baseline
     perf stat -d -d -d -r $repeatScript \
-        systemds scripts/perftest/scripts/transpose.dml \
-        -config scripts/perftest/conf/std.xml \
+        systemds scripts/transpose.dml \
+        -config conf/std.xml \
         -stats \
         -args 20000 5000 $s $methodRepeat \
         >>$LogName 2>&1
@@ -79,12 +80,12 @@ for s in $sparsities; do
     cat $LogName | grep -E '  r. |Total elapsed time|-----------| instructions |  cycles | CPUs utilized ' | tee $LogName.log
 done
 
-LogName="scripts/perftest/results/transpose-large.log"
+LogName="results/transpose-large.log"
 rm -f $LogName
 # Baseline
 perf stat -d -d -d -r $repeatScript \
-    systemds scripts/perftest/scripts/transpose.dml \
-    -config scripts/perftest/conf/std.xml \
+    systemds scripts/transpose.dml \
+    -config conf/std.xml \
     -stats \
     -args 15000000 30 0.8 $methodRepeat \
     >>$LogName 2>&1
diff --git a/scripts/perftest/README.md b/scripts/perftest/README.md
old mode 100644
new mode 100755
index 62385aa..426f2e0
--- a/scripts/perftest/README.md
+++ b/scripts/perftest/README.md
@@ -17,9 +17,9 @@ limitations under the License.
 {% end comment %}
 -->
 
-# Perf tests SystemDS
+# Performance tests SystemDS
 
-to run all performance tests for SystemDS, simply download systemds, install the prerequisites and execute.
+To run all performance tests for SystemDS, simply download systemds, install the prerequisites and execute.
 
 There are a few prerequisites:
 
@@ -28,10 +28,14 @@ There are a few prerequisites:
 - Setup OpenBlas: <https://github.com/xianyi/OpenBLAS/wiki/Precompiled-installation-packages>
 - Install Perf stat: <https://linoxide.com/linux-how-to/install-perf-tool-centos-ubuntu/>
 
-NOTE THE SCRIPT HAS TO BE RUN FROM THE ROOT OF THE REPOSITORY.
+NOTE THE SCRIPT HAS TO BE RUN FROM THE PERFTEST FOLDER.
 
+Examples:
 ```bash
-./scripts/perftest/runAll.sh
+./runAll.sh
 ```
 
-look inside the runAll script to see how to run individual tests.
+Look inside the runAll script to see how to run individual tests.
+
+Time calculations in the bash scripts additionally subtract a number, e.g. ".4". 
+This is done to accommodate for time lost by shell script and JVM startup overheads, to match the actual application runtime of SystemML.
\ No newline at end of file
diff --git a/scripts/perftest/conf/mkl.xml b/scripts/perftest/conf/SystemDS-config.xml
old mode 100644
new mode 100755
similarity index 85%
copy from scripts/perftest/conf/mkl.xml
copy to scripts/perftest/conf/SystemDS-config.xml
index fd655d7..a073707
--- a/scripts/perftest/conf/mkl.xml
+++ b/scripts/perftest/conf/SystemDS-config.xml
@@ -16,7 +16,8 @@
  * specific language governing permissions and limitations
  * under the License.
 -->
+
 <root>
-    <sysds.cp.parallel.ops>true</sysds.cp.parallel.ops>
+    <!-- enables native blas for matrix multiplication and convolution, experimental feature (options: auto, mkl, openblas, none) -->
     <sysds.native.blas>mkl</sysds.native.blas>
-</root>
\ No newline at end of file
+</root>
diff --git a/scripts/perftest/conf/log4j-off.properties b/scripts/perftest/conf/log4j-off.properties
old mode 100644
new mode 100755
diff --git a/scripts/perftest/conf/mkl.xml b/scripts/perftest/conf/mkl.xml
old mode 100644
new mode 100755
diff --git a/scripts/perftest/conf/openblas.xml b/scripts/perftest/conf/openblas.xml
old mode 100644
new mode 100755
diff --git a/scripts/perftest/conf/std.xml b/scripts/perftest/conf/std.xml
old mode 100644
new mode 100755
diff --git a/scripts/perftest/genBinomialData.sh b/scripts/perftest/genBinomialData.sh
new file mode 100755
index 0000000..1352fc0
--- /dev/null
+++ b/scripts/perftest/genBinomialData.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+CMD=$1
+BASE=$2/binomial
+
+FORMAT="binary" # can be csv, mm, text, binary
+DENSE_SP=0.9
+SPARSE_SP=0.01
+
+
+#generate XS scenarios (80MB)
+${CMD} -f ../datagen/genRandData4LogisticRegression.dml --args 10000 1000 5 5 ${BASE}/w10k_1k_dense ${BASE}/X10k_1k_dense ${BASE}/y10k_1k_dense 1 0 $DENSE_SP $FORMAT 1
+${CMD} -f ../datagen/genRandData4LogisticRegression.dml --args 10000 1000 5 5 ${BASE}/w10k_1k_sparse ${BASE}/X10k_1k_sparse ${BASE}/y10k_1k_sparse 1 0 $SPARSE_SP $FORMAT 1
+${CMD} -f scripts/extractTestData.dml --args ${BASE}/X10k_1k_dense ${BASE}/y10k_1k_dense ${BASE}/X10k_1k_dense_test ${BASE}/y10k_1k_dense_test $FORMAT
+${CMD} -f scripts/extractTestData.dml --args ${BASE}/X10k_1k_sparse ${BASE}/y10k_1k_sparse ${BASE}/X10k_1k_sparse_test ${BASE}/y10k_1k_sparse_test $FORMAT
+
+##generate S scenarios (800MB)
+#${CMD} -f ../datagen/genRandData4LogisticRegression.dml --args 100000 1000 5 5 ${BASE}/w100k_1k_dense ${BASE}/X100k_1k_dense ${BASE}/y100k_1k_dense 1 0 $DENSE_SP $FORMAT 1
+#${CMD} -f ../datagen/genRandData4LogisticRegression.dml --args 100000 1000 5 5 ${BASE}/w100k_1k_sparse ${BASE}/X100k_1k_sparse ${BASE}/y100k_1k_sparse 1 0 $SPARSE_SP $FORMAT 1
+#${CMD} -f scripts/extractTestData.dml --args ${BASE}/X100k_1k_dense ${BASE}/y100k_1k_dense ${BASE}/X100k_1k_dense_test ${BASE}/y100k_1k_dense_test $FORMAT
+#${CMD} -f scripts/extractTestData.dml --args ${BASE}/X100k_1k_sparse ${BASE}/y100k_1k_sparse ${BASE}/X100k_1k_sparse_test ${BASE}/y100k_1k_sparse_test $FORMAT
+#
+##generate M scenarios (8GB)
+#${CMD} -f ../datagen/genRandData4LogisticRegression.dml --args 1000000 1000 5 5 ${BASE}/w1M_1k_dense ${BASE}/X1M_1k_dense ${BASE}/y1M_1k_dense 1 0 $DENSE_SP $FORMAT 1
+#${CMD} -f ../datagen/genRandData4LogisticRegression.dml --args 1000000 1000 5 5 ${BASE}/w1M_1k_sparse ${BASE}/X1M_1k_sparse ${BASE}/y1M_1k_sparse 1 0 $SPARSE_SP $FORMAT 1
+#${CMD} -f scripts/extractTestData.dml --args ${BASE}/X1M_1k_dense ${BASE}/y1M_1k_dense ${BASE}/X1M_1k_dense_test ${BASE}/y1M_1k_dense_test $FORMAT
+#${CMD} -f scripts/extractTestData.dml --args ${BASE}/X1M_1k_sparse ${BASE}/y1M_1k_sparse ${BASE}/X1M_1k_sparse_test ${BASE}/y1M_1k_sparse_test $FORMAT
+#
+##generate L scenarios (80GB)
+#${CMD} -f ../datagen/genRandData4LogisticRegression.dml --args 10000000 1000 5 5 ${BASE}/w10M_1k_dense ${BASE}/X10M_1k_dense ${BASE}/y10M_1k_dense 1 0 $DENSE_SP $FORMAT 1
+#${CMD} -f ../datagen/genRandData4LogisticRegression.dml --args 10000000 1000 5 5 ${BASE}/w10M_1k_sparse ${BASE}/X10M_1k_sparse ${BASE}/y10M_1k_sparse 1 0 $SPARSE_SP $FORMAT 1
+#${CMD} -f scripts/extractTestData.dml --args ${BASE}/X10M_1k_dense ${BASE}/y10M_1k_dense ${BASE}/X10M_1k_dense_test ${BASE}/y10M_1k_dense_test $FORMAT
+#${CMD} -f scripts/extractTestData.dml --args ${BASE}/X10M_1k_sparse ${BASE}/y10M_1k_sparse ${BASE}/X10M_1k_sparse_test ${BASE}/y10M_1k_sparse_test $FORMAT
+#
+##generate XL scenarios (800GB)
+#${CMD} -f ../datagen/genRandData4LogisticRegression.dml --args 100000000 1000 5 5 ${BASE}/w100M_1k_dense ${BASE}/X100M_1k_dense ${BASE}/y100M_1k_dense 1 0 $DENSE_SP $FORMAT 1
+#${CMD} -f ../datagen/genRandData4LogisticRegression.dml --args 100000000 1000 5 5 ${BASE}/w100M_1k_sparse ${BASE}/X100M_1k_sparse ${BASE}/y100M_1k_sparse 1 0 $SPARSE_SP $FORMAT 1
+#${CMD} -f scripts/extractTestData.dml --args ${BASE}/X100M_1k_dense ${BASE}/y100M_1k_dense ${BASE}/X100M_1k_dense_test ${BASE}/y100M_1k_dense_test $FORMAT
+#${CMD} -f scripts/extractTestData.dml --args ${BASE}/X100M_1k_sparse ${BASE}/y100M_1k_sparse ${BASE}/X100M_1k_sparse_test ${BASE}/y100M_1k_sparse_test $FORMAT
\ No newline at end of file
diff --git a/scripts/perftestDeprecated/genMultinomialData.sh b/scripts/perftest/genMultinomialData.sh
old mode 100644
new mode 100755
similarity index 57%
rename from scripts/perftestDeprecated/genMultinomialData.sh
rename to scripts/perftest/genMultinomialData.sh
index 1304870..c9020a3
--- a/scripts/perftestDeprecated/genMultinomialData.sh
+++ b/scripts/perftest/genMultinomialData.sh
@@ -20,44 +20,39 @@
 #
 #-------------------------------------------------------------
 
-if [ "$1" == "" -o "$2" == "" ]; then echo "Usage: $0 <hdfsDataDir> <MR | SPARK | ECHO>   e.g. $0 perftest SPARK" ; exit 1 ; fi
-if [ "$2" == "SPARK" ]; then CMD="./sparkDML.sh "; DASH="-"; elif [ "$2" == "MR" ]; then CMD="hadoop jar SystemDS.jar " ; else CMD="echo " ; fi
-
-
-BASE=$1/multinomial
+CMD=$1
+BASE=$2/multinomial
 
 FORMAT="binary" 
 DENSE_SP=0.9
 SPARSE_SP=0.01
 
-export HADOOP_CLIENT_OPTS="-Xmx2048m -Xms2048m -Xmn256m"
-
 #generate XS scenarios (80MB)
 ${CMD} -f ../datagen/genRandData4Multinomial.dml $DASH-args 10000 1000 $DENSE_SP 5 0 $BASE/X10k_1k_dense_k5 $BASE/y10k_1k_dense_k5 $FORMAT 1
 ${CMD} -f ../datagen/genRandData4Multinomial.dml $DASH-args 10000 1000 $SPARSE_SP 5 0 $BASE/X10k_1k_sparse_k5 $BASE/y10k_1k_sparse_k5 $FORMAT 1
-${CMD} -f extractTestData.dml $DASH-args $BASE/X10k_1k_dense_k5 $BASE/y10k_1k_dense_k5 $BASE/X10k_1k_dense_k5_test $BASE/y10k_1k_dense_k5_test $FORMAT
-${CMD} -f extractTestData.dml $DASH-args $BASE/X10k_1k_sparse_k5 $BASE/y10k_1k_sparse_k5 $BASE/X10k_1k_sparse_k5_test $BASE/y10k_1k_sparse_k5_test $FORMAT
+${CMD} -f scripts/extractTestData.dml $DASH-args $BASE/X10k_1k_dense_k5 $BASE/y10k_1k_dense_k5 $BASE/X10k_1k_dense_k5_test $BASE/y10k_1k_dense_k5_test $FORMAT
+${CMD} -f scripts/extractTestData.dml $DASH-args $BASE/X10k_1k_sparse_k5 $BASE/y10k_1k_sparse_k5 $BASE/X10k_1k_sparse_k5_test $BASE/y10k_1k_sparse_k5_test $FORMAT
 
 ##generate S scenarios (80MB)
 #${CMD} -f ../datagen/genRandData4Multinomial.dml $DASH-args 100000 1000 $DENSE_SP 5 0 $BASE/X100k_1k_dense_k5 $BASE/y100k_1k_dense_k5 $FORMAT 1
 #${CMD} -f ../datagen/genRandData4Multinomial.dml $DASH-args 100000 1000 $SPARSE_SP 5 0 $BASE/X100k_1k_sparse_k5 $BASE/y100k_1k_sparse_k5 $FORMAT 1
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X100k_1k_dense_k5 $BASE/y100k_1k_dense_k5 $BASE/X100k_1k_dense_k5_test $BASE/y100k_1k_dense_k5_test $FORMAT
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X100k_1k_sparse_k5 $BASE/y100k_1k_sparse_k5 $BASE/X100k_1k_sparse_k5_test $BASE/y100k_1k_sparse_k5_test $FORMAT
+#${CMD} -f scripts/extractTestData.dml $DASH-args $BASE/X100k_1k_dense_k5 $BASE/y100k_1k_dense_k5 $BASE/X100k_1k_dense_k5_test $BASE/y100k_1k_dense_k5_test $FORMAT
+#${CMD} -f scripts/extractTestData.dml $DASH-args $BASE/X100k_1k_sparse_k5 $BASE/y100k_1k_sparse_k5 $BASE/X100k_1k_sparse_k5_test $BASE/y100k_1k_sparse_k5_test $FORMAT
 #
 ##generate M scenarios (8GB)
 #${CMD} -f ../datagen/genRandData4Multinomial.dml $DASH-args 1000000 1000 $DENSE_SP 5 0 $BASE/X1M_1k_dense_k5 $BASE/y1M_1k_dense_k5 $FORMAT 1
 #${CMD} -f ../datagen/genRandData4Multinomial.dml $DASH-args 1000000 1000 $SPARSE_SP 5 0 $BASE/X1M_1k_sparse_k5 $BASE/y1M_1k_sparse_k5 $FORMAT 1
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X1M_1k_dense_k5 $BASE/y1M_1k_dense_k5 $BASE/X1M_1k_dense_k5_test $BASE/y1M_1k_dense_k5_test $FORMAT
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X1M_1k_sparse_k5 $BASE/y1M_1k_sparse_k5 $BASE/X1M_1k_sparse_k5_test $BASE/y1M_1k_sparse_k5_test $FORMAT
+#${CMD} -f scripts/extractTestData.dml $DASH-args $BASE/X1M_1k_dense_k5 $BASE/y1M_1k_dense_k5 $BASE/X1M_1k_dense_k5_test $BASE/y1M_1k_dense_k5_test $FORMAT
+#${CMD} -f scripts/extractTestData.dml $DASH-args $BASE/X1M_1k_sparse_k5 $BASE/y1M_1k_sparse_k5 $BASE/X1M_1k_sparse_k5_test $BASE/y1M_1k_sparse_k5_test $FORMAT
 #
 ##generate L scenarios (80GB)
 #${CMD} -f ../datagen/genRandData4Multinomial.dml $DASH-args 10000000 1000 $DENSE_SP 5 0 $BASE/X10M_1k_dense_k5 $BASE/y10M_1k_dense_k5 $FORMAT 1
 #${CMD} -f ../datagen/genRandData4Multinomial.dml $DASH-args 10000000 1000 $SPARSE_SP 5 0 $BASE/X10M_1k_sparse_k5 $BASE/y10M_1k_sparse_k5 $FORMAT 1
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X10M_1k_dense_k5 $BASE/y10M_1k_dense_k5 $BASE/X10M_1k_dense_k5_test $BASE/y10M_1k_dense_k5_test $FORMAT
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X10M_1k_sparse_k5 $BASE/y10M_1k_sparse_k5 $BASE/X10M_1k_sparse_k5_test $BASE/y10M_1k_sparse_k5_test $FORMAT
+#${CMD} -f scripts/extractTestData.dml $DASH-args $BASE/X10M_1k_dense_k5 $BASE/y10M_1k_dense_k5 $BASE/X10M_1k_dense_k5_test $BASE/y10M_1k_dense_k5_test $FORMAT
+#${CMD} -f scripts/extractTestData.dml $DASH-args $BASE/X10M_1k_sparse_k5 $BASE/y10M_1k_sparse_k5 $BASE/X10M_1k_sparse_k5_test $BASE/y10M_1k_sparse_k5_test $FORMAT
 #
 ##generate LARGE scenarios (800GB)
 #${CMD} -f ../datagen/genRandData4Multinomial.dml $DASH-args 100000000 1000 $DENSE_SP 5 0 $BASE/X100M_1k_dense_k5 $BASE/y100M_1k_dense_k5 $FORMAT 1
 #${CMD} -f ../datagen/genRandData4Multinomial.dml $DASH-args 100000000 1000 $SPARSE_SP 5 0 $BASE/X100M_1k_sparse_k5 $BASE/y100M_1k_sparse_k5 $FORMAT 1
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X100M_1k_dense_k5 $BASE/y100M_1k_dense_k5 $BASE/X100M_1k_dense_k5_test $BASE/y100M_1k_dense_k5_test $FORMAT
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X100M_1k_sparse_k5 $BASE/y100M_1k_sparse_k5 $BASE/X100M_1k_sparse_k5_test $BASE/y100M_1k_sparse_k5_test $FORMAT
+#${CMD} -f scripts/extractTestData.dml $DASH-args $BASE/X100M_1k_dense_k5 $BASE/y100M_1k_dense_k5 $BASE/X100M_1k_dense_k5_test $BASE/y100M_1k_dense_k5_test $FORMAT
+#${CMD} -f scripts/extractTestData.dml $DASH-args $BASE/X100M_1k_sparse_k5 $BASE/y100M_1k_sparse_k5 $BASE/X100M_1k_sparse_k5_test $BASE/y100M_1k_sparse_k5_test $FORMAT
diff --git a/scripts/perftest/runAll.sh b/scripts/perftest/runAll.sh
index a168a51..a2f0989 100755
--- a/scripts/perftest/runAll.sh
+++ b/scripts/perftest/runAll.sh
@@ -20,11 +20,52 @@
 #
 #-------------------------------------------------------------
 
+# Optional argument that can be a folder name for where generated data is stored
+TEMPFOLDER=$1
+if [ "$TEMPFOLDER" == "" ]; then TEMPFOLDER=temp ; fi
 
-# Micro Benchmarks:
+# Set properties
+export LOG4JPROP='conf/log4j-off.properties'
+export SYSDS_QUIET=1
 
-./scripts/perftest/MatrixMult.sh
-./scripts/perftest/MatrixTranspose.sh
+# Command to be executed
+CMD="systemds"
+#CMD="./sparkDML.sh"
 
-# Algorithms Benchmarks:
+# Possible lines to initialize Intel MKL, depending on version and install location
+#    . ~/intel/bin/compilervars.sh intel64
+#    . ~/intel/oneapi/setvars.sh intel64
+#    . /opt/intel/bin/compilervars.sh intel64
+
+
+### Micro Benchmarks:
+#./MatrixMult.sh
+#./MatrixTranspose.sh
+
+
+### Algorithms Benchmarks:
+
+# init time measurement
+if [ ! -d results ]; then mkdir -p results ; fi
+date >> results/times.txt
+
+# TODO Use the built-in function lmPredict instead of the GLM-predict.dml script, for linear regression.
+./runAllBinomial.sh $CMD $TEMPFOLDER
+./runAllMultinomial.sh $CMD $TEMPFOLDER
+./runAllRegression.sh $CMD $TEMPFOLDER
+
+# TODO The following commented benchmarks have yet to be cleaned up and ported from perftestDeprecated to perftest
+#./runAllStats.sh $CMD $TEMPFOLDER
+#./runAllClustering.sh $CMD $TEMPFOLDER
+
+# add stepwise Linear 
+# add stepwise GLM
+#./runAllTrees $CMD $TEMPFOLDER
+# add randomForest
+#./runAllDimensionReduction $CMD $TEMPFOLDER
+#./runAllMatrixFactorization $CMD $TEMPFOLDER
+#ALS
+#./runAllSurvival $CMD $TEMPFOLDER
+#KaplanMeier
+#Cox
 
diff --git a/scripts/perftestDeprecated/runAllBinomial.sh b/scripts/perftest/runAllBinomial.sh
old mode 100644
new mode 100755
similarity index 66%
rename from scripts/perftestDeprecated/runAllBinomial.sh
rename to scripts/perftest/runAllBinomial.sh
index 5bd973f..9c8b738
--- a/scripts/perftestDeprecated/runAllBinomial.sh
+++ b/scripts/perftest/runAllBinomial.sh
@@ -20,7 +20,14 @@
 #
 #-------------------------------------------------------------
 
-if [ "$1" == "" -o "$2" == "" ]; then  echo "Usage: $0 <hdfsDataDir> <MR | SPARK | ECHO>   e.g. $0 perftest SPARK" ; exit 1 ; fi
+COMMAND=$1
+if [ "$COMMAND" == "" ]; then COMMAND="systemds" ; fi
+
+TEMPFOLDER=$2
+if [ "$TEMPFOLDER" == "" ]; then TEMPFOLDER=temp ; fi
+
+BASE=${TEMPFOLDER}/binomial
+MAXITR=20
 
 FILENAME=$0
 err_report() {
@@ -28,23 +35,21 @@ err_report() {
 }
 trap 'err_report $LINENO' ERR
 
-BASE=$1/binomial
+if [ ! -d logs ]; then mkdir -p logs ; fi
+if [ ! -d results ]; then mkdir -p results ; fi
 
-echo $2" RUN BINOMIAL EXPERIMENTS: "$(date) >> times.txt;
-
-if [ ! -d logs ]; then mkdir logs ; fi
+echo "RUN BINOMIAL EXPERIMENTS: "$(date) >> results/times.txt;
 
 # data generation
-echo $2"-- Generating binomial data: " >> times.txt;
-./genBinomialData.sh $1 $2 &>> logs/genBinomialData.out
+echo "-- Generating binomial data: " >> results/times.txt;
+./genBinomialData.sh ${COMMAND} ${TEMPFOLDER} &>> logs/genBinomialData.out
 
 # run all classifiers with binomial labels on all datasets
-MAXITR=20
 for d in "10k_1k_dense" "10k_1k_sparse" # "100k_1k_dense" "100k_1k_sparse" "1M_1k_dense" "1M_1k_sparse" "10M_1k_dense" "10M_1k_sparse" #"_KDD" "100M_1k_dense" "100M_1k_sparse" 
-do 
-   for f in "runMultiLogReg" "runL2SVM" "runMSVM" 
+do
+   for f in "runMultiLogReg" "runL2SVM" "runMSVM"
    do
-      echo "-- Running "$f" on "$d" (all configs): " >> times.txt;
-      ./${f}.sh ${BASE}/X${d} ${BASE}/y${d} 2 ${BASE} $2 ${MAXITR} &> logs/${f}_${d}.out;       
+      echo "-- Running "$f" on "$d" (all configs): " >> results/times.txt;
+      ./${f}.sh ${BASE}/X${d} ${BASE}/y${d} 2 ${BASE} ${MAXITR} ${COMMAND} &> logs/${f}_${d}.out;
    done 
 done
diff --git a/scripts/perftestDeprecated/runAllMultinomial.sh b/scripts/perftest/runAllMultinomial.sh
old mode 100644
new mode 100755
similarity index 59%
rename from scripts/perftestDeprecated/runAllMultinomial.sh
rename to scripts/perftest/runAllMultinomial.sh
index 7a32cb5..da6277a
--- a/scripts/perftestDeprecated/runAllMultinomial.sh
+++ b/scripts/perftest/runAllMultinomial.sh
@@ -20,7 +20,15 @@
 #
 #-------------------------------------------------------------
 
-if [ "$1" == "" -o "$2" == "" ]; then  echo "Usage: $0 <hdfsDataDir> <MR | SPARK | ECHO>   e.g. $0 perftest SPARK" ; exit 1 ; fi
+COMMAND=$1
+if [ "$COMMAND" == "" ]; then COMMAND="systemds" ; fi
+
+TEMPFOLDER=$2
+if [ "$TEMPFOLDER" == "" ]; then TEMPFOLDER=temp ; fi
+
+BASE=${TEMPFOLDER}/multinomial
+BASE0=${TEMPFOLDER}/binomial
+MAXITR=20
 
 FILENAME=$0
 err_report() {
@@ -28,37 +36,28 @@ err_report() {
 }
 trap 'err_report $LINENO' ERR
 
-BASE=$1/multinomial
-BASE0=$1/binomial
-
+if [ ! -d logs ]; then mkdir -p logs ; fi
+if [ ! -d results ]; then mkdir -p results ; fi
 
-echo $2" RUN MULTINOMIAL EXPERIMENTS: "$(date) >> times.txt;
-
-if [ ! -d logs ]; then mkdir logs ; fi
+echo " RUN MULTINOMIAL EXPERIMENTS: "$(date) >> results/times.txt;
 
 # data generation
-echo "-- Generating multinomial data." >> times.txt;
-./genMultinomialData.sh $1 $2 &>> logs/genMultinomialData.out
+echo "-- Generating multinomial data." >> results/times.txt;
+./genMultinomialData.sh ${COMMAND} ${TEMPFOLDER} &>> logs/genMultinomialData.out
 
 # run all classifiers with binomial labels on all datasets
-MAXITR=20
 for d in "10k_1k_dense" "10k_1k_sparse" # "100k_1k_dense" "100k_1k_sparse" "1M_1k_dense" "1M_1k_sparse" "10M_1k_dense" "10M_1k_sparse" "100M_1k_dense" "100M_1k_sparse" 
 do 
    for f in "runNaiveBayes"
    do
-      echo "-- Running "$f" on "$d" (all configs)" >> times.txt;
-      ./${f}.sh ${BASE}/X${d}_k5 ${BASE}/y${d}_k5 5 ${BASE} $2 &> logs/${f}_${d}_k5.out;       
+      echo "-- Running "$f" on "$d" (all configs)" >> results/times.txt;
+      ./${f}.sh ${BASE}/X${d}_k5 ${BASE}/y${d}_k5 5 ${BASE} ${COMMAND} &> logs/${f}_${d}_k5.out;
    done
-   
+
    # run with the parameter setting maximum of iterations
    for f in "runMultiLogReg" "runMSVM"
    do
-      echo "-- Running "$f" on "$d" (all configs)" >> times.txt;
-      ./${f}.sh ${BASE}/X${d}_k5 ${BASE}/y${d}_k5 5 ${BASE} $2 ${MAXITR} &> logs/${f}_${d}_k5.out;       
+      echo "-- Running "$f" on "$d" (all configs)" >> results/times.txt;
+      ./${f}.sh ${BASE}/X${d}_k5 ${BASE}/y${d}_k5 5 ${BASE} ${MAXITR} ${COMMAND} &> logs/${f}_${d}_k5.out;
    done
 done
-
-#run KDD only on naive bayes (see binomial for the others)
-#./runNaiveBayes.sh ${BASE0}/X_KDD_k5 ${BASE}/y_KDD_k5 5 &> logs/runNaiveBayes__KDD_k5.out;       
-#./runNaiveBayes.sh ${BASE0}/X_KDD ${BASE}/y_KDD 5 &> logs/runNaiveBayes__KDD_k5.out;       
-   
diff --git a/scripts/perftestDeprecated/runAllRegression.sh b/scripts/perftest/runAllRegression.sh
old mode 100644
new mode 100755
similarity index 53%
rename from scripts/perftestDeprecated/runAllRegression.sh
rename to scripts/perftest/runAllRegression.sh
index 2ec0a30..4e3d098
--- a/scripts/perftestDeprecated/runAllRegression.sh
+++ b/scripts/perftest/runAllRegression.sh
@@ -20,7 +20,14 @@
 #
 #-------------------------------------------------------------
 
-if [ "$1" == "" -o "$2" == "" ]; then  echo "Usage: $0 <hdfsDataDir> <MR | SPARK | ECHO>   e.g. $0 perftest SPARK" ; exit 1 ; fi
+COMMAND=$1
+if [ "$COMMAND" == "" ]; then COMMAND="systemds" ; fi
+
+TEMPFOLDER=$2
+if [ "$TEMPFOLDER" == "" ]; then TEMPFOLDER=temp ; fi
+
+BASE=${TEMPFOLDER}/binomial
+MAXITR=20
 
 FILENAME=$0
 err_report() {
@@ -28,30 +35,34 @@ err_report() {
 }
 trap 'err_report $LINENO' ERR
 
-BASE=$1/binomial
-
-echo $2" RUN REGRESSION EXPERIMENTS" $(date) >> times.txt;
+if [ ! -d logs ]; then mkdir -p logs ; fi
+if [ ! -d results ]; then mkdir -p results ; fi
 
-if [ ! -d logs ]; then mkdir logs ; fi
+echo "RUN REGRESSION EXPERIMENTS" $(date) >> results/times.txt;
 
 # data generation
-echo $2"-- Using binomial data: " >> times.txt;
-./genBinomialData.sh $1 $2 &>> logs/genBinomialData.out
+echo "-- Generating binomial data: " >> results/times.txt;
+./genBinomialData.sh ${COMMAND} ${TEMPFOLDER} &>> logs/genBinomialData.out
 
 # run all regression algorithms with binomial labels on all datasets
-MAXITR=20
 for d in "10k_1k_dense" "10k_1k_sparse" # "100k_1k_dense" "100k_1k_sparse" "1M_1k_dense" "1M_1k_sparse" "10M_1k_dense" "10M_1k_sparse" #"_KDD" "100M_1k_dense" "100M_1k_sparse" 
 do
+
+   # -------------------------------------------------------------------------------------------------------------------
+   # TODO return an additional output to preserve the internal scaling from training (for the built-in functions lmCG and lmDS).
+   # The original scripts algorithms/LinearRegCG.dml and algorithms/LinearRegDS.dml do have that additional output column, but the respective built-in functions do not.
+   # -------------------------------------------------------------------------------------------------------------------
+
    for f in "runLinearRegDS"
    do
-       echo "-- Running "$f" on "$d" (all configs)" >> times.txt;
-       ./${f}.sh ${BASE}/X${d} ${BASE}/y${d} ${BASE} $2 &> logs/${f}_${d}.out;
-   done 
+       echo "-- Running "$f" on "$d" (all configs)" >> results/times.txt;
+       ./${f}.sh ${BASE}/X${d} ${BASE}/y${d} ${BASE} ${COMMAND} &> logs/${f}_${d}.out;
+   done
 
    # run with the parameter setting maximum of iterations
    for f in "runLinearRegCG" "runGLM_poisson_log" "runGLM_gamma_log" "runGLM_binomial_probit"
    do
-      echo "-- Running "$f" on "$d" (all configs)" >> times.txt;
-      ./${f}.sh ${BASE}/X${d} ${BASE}/y${d} ${BASE} $2 ${MAXITR} &> logs/${f}_${d}.out;       
-   done 
+      echo "-- Running "$f" on "$d" (all configs)" >> results/times.txt;
+      ./${f}.sh ${BASE}/X${d} ${BASE}/y${d} ${BASE} ${MAXITR} ${COMMAND} &> logs/${f}_${d}.out;
+   done
 done
diff --git a/scripts/perftestDeprecated/runGLM_binomial_probit.sh b/scripts/perftest/runGLM_binomial_probit.sh
old mode 100644
new mode 100755
similarity index 62%
rename from scripts/perftestDeprecated/runGLM_binomial_probit.sh
rename to scripts/perftest/runGLM_binomial_probit.sh
index 0da25d4..e101083
--- a/scripts/perftestDeprecated/runGLM_binomial_probit.sh
+++ b/scripts/perftest/runGLM_binomial_probit.sh
@@ -21,26 +21,31 @@
 #-------------------------------------------------------------
 set -e
 
-if [ "$4" == "SPARK" ]; then CMD="./sparkDML.sh "; DASH="-"; elif [ "$4" == "MR" ]; then CMD="hadoop jar SystemDS.jar " ; else CMD="echo " ; fi
-
+CMD=$5
 BASE=$3
 
-export HADOOP_CLIENT_OPTS="-Xmx2048m -Xms2048m -Xmn256m"
-
 # run all intercepts
-for i in 0 1 2
-do
+for i in 0 1 2; do
    echo "running GLM binomial probit on ict="$i
 
    #training
-   tstart=$SECONDS
-   ${CMD} -f ../algorithms/GLM.dml $DASH-explain $DASH-stats $DASH-nvargs X=$1 Y=$2 B=${BASE}/b icpt=${i} fmt="csv" moi=$5 mii=5 dfam=2 link=3 yneg=2 tol=0.0001 reg=0.01
-   ttrain=$(($SECONDS - $tstart - 3))
-   echo "GLM_binomial_probit train ict="$i" on "$1": "$ttrain >> times.txt
+   tstart=$(date +%s.%N)
+   # ${CMD} -f ../algorithms/GLM.dml \
+   ${CMD} -f scripts/GLM.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs X=$1 Y=$2 B=${BASE}/b icpt=${i} fmt="csv" moi=$4 mii=5 dfam=2 link=3 yneg=2 tol=0.0001 reg=0.01
+
+   ttrain=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "GLM_binomial_probit train ict="$i" on "$1": "$ttrain >> results/times.txt
 
    #predict
-   tstart=$SECONDS   
-   ${CMD} -f ../algorithms/GLM-predict.dml $DASH-explain $DASH-stats $DASH-nvargs dfam=2 link=3 fmt=csv X=$1_test B=${BASE}/b Y=$2_test M=${BASE}/m O=${BASE}/out.csv
-   tpredict=$(($SECONDS - $tstart - 3))
-   echo "GLM_binomial_probit predict ict="$i" on "$1": "$tpredict >> times.txt
+   tstart=$(date +%s.%N)
+   ${CMD} -f ../algorithms/GLM-predict.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs dfam=2 link=3 fmt=csv X=$1_test B=${BASE}/b Y=$2_test M=${BASE}/m O=${BASE}/out.csv
+
+   tpredict=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "GLM_binomial_probit predict ict="$i" on "$1": "$tpredict >> results/times.txt
 done
diff --git a/scripts/perftestDeprecated/runGLM_gamma_log.sh b/scripts/perftest/runGLM_gamma_log.sh
old mode 100644
new mode 100755
similarity index 55%
rename from scripts/perftestDeprecated/runGLM_gamma_log.sh
rename to scripts/perftest/runGLM_gamma_log.sh
index 2ead945..9eb8e9f
--- a/scripts/perftestDeprecated/runGLM_gamma_log.sh
+++ b/scripts/perftest/runGLM_gamma_log.sh
@@ -21,26 +21,31 @@
 #-------------------------------------------------------------
 set -e
 
-if [ "$4" == "SPARK" ]; then CMD="./sparkDML.sh "; DASH="-"; elif [ "$4" == "MR" ]; then CMD="hadoop jar SystemDS.jar " ; else CMD="echo " ; fi
-
+CMD=$5
 BASE=$3
 
-export HADOOP_CLIENT_OPTS="-Xmx2048m -Xms2048m -Xmn256m"
-
 # run all intercepts
-for i in 0 1 2
-do
+for i in 0 1 2; do
    echo "running GLM gamma log on ict="$i
    
    #training
-   tstart=$SECONDS
-   ${CMD} -f ../algorithms/GLM.dml $DASH-explain $DASH-stats $DASH-nvargs X=$1 Y=$2 B=${BASE}/b icpt=${i} fmt="csv" moi=$5 mii=5 dfam=1 vpow=2.0 link=1 lpow=0.0 tol=0.0001 reg=0.01
-   ttrain=$(($SECONDS - $tstart - 3))
-   echo "GLM_gamma_log train ict="$i" on "$1": "$ttrain >> times.txt
+   tstart=$(date +%s.%N)
+   #${CMD} -f ../algorithms/GLM.dml \
+   ${CMD} -f scripts/GLM.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs X=$1 Y=$2 B=${BASE}/b icpt=${i} fmt="csv" moi=$4 mii=5 dfam=1 vpow=2.0 link=1 lpow=0.0 tol=0.0001 reg=0.01
+
+   ttrain=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "GLM_gamma_log train ict="$i" on "$1": "$ttrain >> results/times.txt
 
    #predict
-   tstart=$SECONDS
-   ${CMD} -f ../algorithms/GLM-predict.dml $DASH-explain $DASH-stats $DASH-nvargs dfam=1 vpow=2.0 link=1 lpow=0.0 fmt=csv X=$1_test B=${BASE}/b Y=$2_test M=${BASE}/m O=${BASE}/out.csv
-   tpredict=$(($SECONDS - $tstart - 3))
-   echo "GLM_gamma_log predict ict="$i" on "$1": "$tpredict >> times.txt
+   tstart=$(date +%s.%N)
+   ${CMD} -f ../algorithms/GLM-predict.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs dfam=1 vpow=2.0 link=1 lpow=0.0 fmt=csv X=$1_test B=${BASE}/b Y=$2_test M=${BASE}/m O=${BASE}/out.csv
+
+   tpredict=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "GLM_gamma_log predict ict="$i" on "$1": "$tpredict >> results/times.txt
 done
diff --git a/scripts/perftestDeprecated/runGLM_poisson_log.sh b/scripts/perftest/runGLM_poisson_log.sh
old mode 100644
new mode 100755
similarity index 58%
rename from scripts/perftestDeprecated/runGLM_poisson_log.sh
rename to scripts/perftest/runGLM_poisson_log.sh
index da3256d..69c2419
--- a/scripts/perftestDeprecated/runGLM_poisson_log.sh
+++ b/scripts/perftest/runGLM_poisson_log.sh
@@ -21,26 +21,31 @@
 #-------------------------------------------------------------
 set -e
 
-if [ "$4" == "SPARK" ]; then CMD="./sparkDML.sh "; DASH="-"; elif [ "$4" == "MR" ]; then CMD="hadoop jar SystemDS.jar " ; else CMD="echo " ; fi
-
+CMD=$5
 BASE=$3
 
-export HADOOP_CLIENT_OPTS="-Xmx2048m -Xms2048m -Xmn256m"
-
 # run all intercepts
-for i in 0 1 2
-do
+for i in 0 1 2; do
    echo "running GLM poisson log on ict="$i
    
    #training
-   tstart=$SECONDS
-   ${CMD} -f ../algorithms/GLM.dml $DASH-explain $DASH-stats $DASH-nvargs X=$1 Y=$2 B=${BASE}/b icpt=${i} fmt="csv" moi=$5 mii=5 dfam=1 vpow=1.0 link=1 lpow=0.0 tol=0.0001 reg=0.01
-   ttrain=$(($SECONDS - $tstart - 3))
-   echo "GLM_poisson_log train ict="$i" on "$1": "$ttrain >> times.txt
+   tstart=$(date +%s.%N)
+   #${CMD} -f ../algorithms/GLM.dml \
+   ${CMD} -f scripts/GLM.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs X=$1 Y=$2 B=${BASE}/b icpt=${i} fmt="csv" moi=$4 mii=5 dfam=1 vpow=1.0 link=1 lpow=0.0 tol=0.0001 reg=0.01
+
+   ttrain=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "GLM_poisson_log train ict="$i" on "$1": "$ttrain >> results/times.txt
    
    #predict
-   tstart=$SECONDS   
-   ${CMD} -f ../algorithms/GLM-predict.dml $DASH-explain $DASH-stats $DASH-nvargs dfam=1 vpow=1.0 link=1 lpow=0.0 fmt=csv X=$1_test B=${BASE}/b Y=$2_test M=${BASE}/m O=${BASE}/out.csv
-   tpredict=$(($SECONDS - $tstart - 3))
-   echo "GLM_poisson_log predict ict="$i" on "$1": "$tpredict >> times.txt
+   tstart=$(date +%s.%N)
+   ${CMD} -f ../algorithms/GLM-predict.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs dfam=1 vpow=1.0 link=1 lpow=0.0 fmt=csv X=$1_test B=${BASE}/b Y=$2_test M=${BASE}/m O=${BASE}/out.csv
+
+   tpredict=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "GLM_poisson_log predict ict="$i" on "$1": "$tpredict >> results/times.txt
 done
diff --git a/scripts/perftestDeprecated/runMSVM.sh b/scripts/perftest/runL2SVM.sh
old mode 100644
new mode 100755
similarity index 54%
rename from scripts/perftestDeprecated/runMSVM.sh
rename to scripts/perftest/runL2SVM.sh
index f481bd0..9b0f2a9
--- a/scripts/perftestDeprecated/runMSVM.sh
+++ b/scripts/perftest/runL2SVM.sh
@@ -21,24 +21,31 @@
 #-------------------------------------------------------------
 set -e
 
-if [ "$5" == "SPARK" ]; then CMD="./sparkDML.sh "; DASH="-"; elif [ "$5" == "MR" ]; then CMD="hadoop jar SystemDS.jar " ; else CMD="echo " ; fi
-
+CMD=$6
 BASE=$4
 
-export HADOOP_CLIENT_OPTS="-Xmx2048m -Xms2048m -Xmn256m"
-
 #for all intercept values
-for i in 0 1
-do
+for i in 0 1; do
    #training
-   tstart=$SECONDS
-   ${CMD} -f ../algorithms/m-svm.dml $DASH-explain $DASH-stats $DASH-nvargs X=$1 Y=$2 icpt=$i classes=$3 tol=0.0001 reg=0.01 maxiter=$6 model=${BASE}/w Log=${BASE}/debug_output fmt="csv"
-   ttrain=$(($SECONDS - $tstart - 3))
-   echo "MSVM train ict="$i" on "$1": "$ttrain >> times.txt
+   tstart=$(date +%s.%N)
+
+   # /algorithms/l2-svm.dml already calls a built-in function for the l2 svm.
+   ${CMD} -f ../algorithms/l2-svm.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs X=$1 Y=$2 icpt=$i tol=0.0001 reg=0.01 maxiter=$5 model=${BASE}/b fmt="csv"
+
+   ttrain=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "L2SVM train ict="$i" on "$1": "$ttrain >> results/times.txt
 
    #predict
-   tstart=$SECONDS
-   ${CMD} -f ../algorithms/m-svm-predict.dml $DASH-explain $DASH-stats $DASH-nvargs X=$1_test Y=$2_test icpt=$i model=${BASE}/w fmt="csv"
-   tpredict=$(($SECONDS - $tstart - 3))
-   echo "MSVM predict ict="$i" on "$1": "$tpredict >> times.txt
+   tstart=$(date +%s.%N)
+   #${CMD} -f ../algorithms/l2-svm-predict.dml \
+   ${CMD} -f scripts/l2-svm-predict.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs X=$1_test Y=$2_test icpt=$i model=${BASE}/b fmt="csv" scores=${BASE}/scores
+
+   tpredict=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "L2SVM predict ict="$i" on "$1": "$tpredict >> results/times.txt
 done
diff --git a/scripts/perftestDeprecated/runLinearRegCG.sh b/scripts/perftest/runLinearRegCG.sh
old mode 100644
new mode 100755
similarity index 57%
rename from scripts/perftestDeprecated/runLinearRegCG.sh
rename to scripts/perftest/runLinearRegCG.sh
index 2d359f9..e61fd97
--- a/scripts/perftestDeprecated/runLinearRegCG.sh
+++ b/scripts/perftest/runLinearRegCG.sh
@@ -21,26 +21,32 @@
 #-------------------------------------------------------------
 set -e
 
-if [ "$4" == "SPARK" ]; then CMD="./sparkDML.sh "; DASH="-"; elif [ "$4" == "MR" ]; then CMD="hadoop jar SystemDS.jar " ; else CMD="echo " ; fi
-
+CMD=$5
 BASE=$3
 
-export HADOOP_CLIENT_OPTS="-Xmx2048m -Xms2048m -Xmn256m"
-
 # run all intercepts
 for i in 0 1 2
 do
    echo "running linear regression CG on ict="$i
    
    #training
-   tstart=$SECONDS
-   ${CMD} -f ../algorithms/LinearRegCG.dml $DASH-explain $DASH-stats $DASH-nvargs X=$1 Y=$2 B=${BASE}/b icpt=${i} fmt="csv" maxi=$5 tol=0.0001 reg=0.01
-   ttrain=$(($SECONDS - $tstart - 3))
-   echo "LinRegCG train ict="$i" on "$1": "$ttrain >> times.txt
+   tstart=$(date +%s.%N)
+   #${CMD} -f ../algorithms/LinearRegCG.dml \
+   ${CMD} -f scripts/LinearRegCG.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs X=$1 Y=$2 B=${BASE}/b icpt=${i} fmt="csv" maxi=$4 tol=0.0001 reg=0.01
+
+   ttrain=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "LinRegCG train ict="$i" on "$1": "$ttrain >> results/times.txt
 
    #predict
-   tstart=$SECONDS
-   ${CMD} -f ../algorithms/GLM-predict.dml $DASH-explain $DASH-stats $DASH-nvargs dfam=1 link=1 vpow=0.0 lpow=1.0 fmt=csv X=$1_test B=${BASE}/b Y=$2_test M=${BASE}/m O=${BASE}/out.csv
-   tpredict=$(($SECONDS - $tstart - 3))
-   echo "LinRegCG predict ict="$i" on "$1": "$tpredict >> times.txt
+   tstart=$(date +%s.%N)
+   ${CMD} -f ../algorithms/GLM-predict.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs dfam=1 link=1 vpow=0.0 lpow=1.0 fmt=csv X=$1_test B=${BASE}/b Y=$2_test M=${BASE}/m O=${BASE}/out.csv
+
+   tpredict=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "LinRegCG predict ict="$i" on "$1": "$tpredict >> results/times.txt
 done
diff --git a/scripts/perftestDeprecated/runLinearRegDS.sh b/scripts/perftest/runLinearRegDS.sh
old mode 100644
new mode 100755
similarity index 58%
rename from scripts/perftestDeprecated/runLinearRegDS.sh
rename to scripts/perftest/runLinearRegDS.sh
index bf8b98e..547ce0b
--- a/scripts/perftestDeprecated/runLinearRegDS.sh
+++ b/scripts/perftest/runLinearRegDS.sh
@@ -21,26 +21,32 @@
 #-------------------------------------------------------------
 set -e
 
-if [ "$4" == "SPARK" ]; then CMD="./sparkDML.sh "; DASH="-"; elif [ "$4" == "MR" ]; then CMD="hadoop jar SystemDS.jar " ; else CMD="echo " ; fi
-
+CMD=$4
 BASE=$3
 
-export HADOOP_CLIENT_OPTS="-Xmx2048m -Xms2048m -Xmn256m"
-
 # run all intercepts
 for i in 0 1 2
 do
    echo "running linear regression DS on ict="$i
 
    #training
-   tstart=$SECONDS
-   ${CMD} -f ../algorithms/LinearRegDS.dml $DASH-explain $DASH-stats $DASH-nvargs X=$1 Y=$2 B=${BASE}/b icpt=${i} fmt="csv" reg=0.01
-   ttrain=$(($SECONDS - $tstart - 3))
-   echo "LinRegDS train ict="$i" on "$1": "$ttrain >> times.txt
+   tstart=$(date +%s.%N)
+   #${CMD} -f ../algorithms/LinearRegDS.dml \
+   ${CMD} -f scripts/LinearRegDS.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs X=$1 Y=$2 B=${BASE}/b icpt=${i} fmt="csv" reg=0.01
+
+   ttrain=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "LinRegDS train ict="$i" on "$1": "$ttrain >> results/times.txt
 
    #predict
-   tstart=$SECONDS
-   ${CMD} -f ../algorithms/GLM-predict.dml $DASH-explain $DASH-stats $DASH-nvargs dfam=1 link=1 vpow=0.0 lpow=1.0 fmt=csv X=$1_test B=${BASE}/b Y=$2_test M=${BASE}/m O=${BASE}/out.csv
-   tpredict=$(($SECONDS - $tstart - 3))
-   echo "LinRegDS predict ict="$i" on "$1": "$tpredict >> times.txt
+   tstart=$(date +%s.%N)
+   ${CMD} -f ../algorithms/GLM-predict.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs dfam=1 link=1 vpow=0.0 lpow=1.0 fmt=csv X=$1_test B=${BASE}/b Y=$2_test M=${BASE}/m O=${BASE}/out.csv
+
+   tpredict=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "LinRegDS predict ict="$i" on "$1": "$tpredict >> results/times.txt
 done
diff --git a/scripts/perftestDeprecated/runL2SVM.sh b/scripts/perftest/runMSVM.sh
old mode 100644
new mode 100755
similarity index 56%
rename from scripts/perftestDeprecated/runL2SVM.sh
rename to scripts/perftest/runMSVM.sh
index 30414bd..fde7cb5
--- a/scripts/perftestDeprecated/runL2SVM.sh
+++ b/scripts/perftest/runMSVM.sh
@@ -21,24 +21,30 @@
 #-------------------------------------------------------------
 set -e
 
-if [ "$5" == "SPARK" ]; then CMD="./sparkDML.sh "; DASH="-"; elif [ "$5" == "MR" ]; then CMD="hadoop jar SystemDS.jar " ; else CMD="echo " ; fi
-
+CMD=$6
 BASE=$4
 
-export HADOOP_CLIENT_OPTS="-Xmx2048m -Xms2048m -Xmn256m"
-
 #for all intercept values
-for i in 0 1
-do
+for i in 0 1; do
    #training
-   tstart=$SECONDS
-   ${CMD} -f ../algorithms/l2-svm.dml $DASH-explain $DASH-stats $DASH-nvargs X=$1 Y=$2 icpt=$i tol=0.0001 reg=0.01 maxiter=$6 model=${BASE}/b Log=${BASE}/debug_output fmt="csv"
-   ttrain=$(($SECONDS - $tstart - 3))
-   echo "L2SVM train ict="$i" on "$1": "$ttrain >> times.txt
+   tstart=$(date +%s.%N)
+   # ${CMD} -f ../algorithms/m-svm.dml \
+   ${CMD} -f scripts/m-svm.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs X=$1 Y=$2 icpt=$i classes=$3 tol=0.0001 reg=0.01 maxiter=$5 model=${BASE}/w fmt="csv"
+
+   ttrain=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "MSVM train ict="$i" on "$1": "$ttrain >> results/times.txt
 
    #predict
-   tstart=$SECONDS
-   ${CMD} -f ../algorithms/l2-svm-predict.dml $DASH-explain $DASH-stats $DASH-nvargs X=$1_test Y=$2_test icpt=$i model=${BASE}/b fmt="csv"
-   tpredict=$(($SECONDS - $tstart - 3))
-   echo "L2SVM predict ict="$i" on "$1": "$tpredict >> times.txt
+   tstart=$(date +%s.%N)
+   #${CMD} -f ../algorithms/m-svm-predict.dml \
+   ${CMD} -f scripts/m-svm-predict.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs X=$1_test Y=$2_test icpt=$i model=${BASE}/w fmt="csv"
+
+   tpredict=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "MSVM predict ict="$i" on "$1": "$tpredict >> results/times.txt
 done
diff --git a/scripts/perftestDeprecated/runMultiLogReg.sh b/scripts/perftest/runMultiLogReg.sh
old mode 100644
new mode 100755
similarity index 54%
rename from scripts/perftestDeprecated/runMultiLogReg.sh
rename to scripts/perftest/runMultiLogReg.sh
index e3ad323..6dcb385
--- a/scripts/perftestDeprecated/runMultiLogReg.sh
+++ b/scripts/perftest/runMultiLogReg.sh
@@ -8,9 +8,9 @@
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
 # with the License.  You may obtain a copy of the License at
-# 
+#
 #   http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing,
 # software distributed under the License is distributed on an
 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -21,30 +21,32 @@
 #-------------------------------------------------------------
 set -e
 
-if [ "$5" == "SPARK" ]; then CMD="./sparkDML.sh "; DASH="-"; elif [ "$5" == "MR" ]; then CMD="hadoop jar SystemDS.jar " ; else CMD="echo " ; fi
-
+CMD=$6
 BASE=$4
 
-export HADOOP_CLIENT_OPTS="-Xmx2048m -Xms2048m -Xmn256m"
-
 DFAM=2
-if [ $3 -gt 2 ] 
-then
-   DFAM=3
-fi
+if [ $3 -gt 2 ]; then DFAM=3; fi
 
 #for all intercept values
-for i in 0 1 2
-do
+for i in 0 1 2; do
    #training
-   tstart=$SECONDS
-   ${CMD} -f ../algorithms/MultiLogReg.dml $DASH-explain $DASH-stats $DASH-nvargs icpt=$i reg=0.01 tol=0.0001 moi=$6 mii=5 X=$1 Y=$2 B=${BASE}/b
-   ttrain=$(($SECONDS - $tstart - 3))
-   echo "MultiLogReg train ict="$i" on "$1": "$ttrain >> times.txt
-   
+   tstart=$(date +%s.%N)
+   # ${CMD} -f ../algorithms/MultiLogReg.dml \
+   ${CMD} -f scripts/MultiLogReg.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs icpt=$i reg=0.01 tol=0.0001 moi=$5 mii=5 X=$1 Y=$2 B=${BASE}/b
+
+   ttrain=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "MultiLogReg train ict="$i" on "$1": "$ttrain >> results/times.txt
+
    #predict
-   tstart=$SECONDS   
-   ${CMD} -f ../algorithms/GLM-predict.dml $DASH-explain $DASH-stats $DASH-nvargs dfam=$DFAM vpow=-1 link=2 lpow=-1 fmt=csv X=$1_test B=${BASE}/b Y=$2_test M=${BASE}/m O=${BASE}/out.csv
-   tpredict=$(($SECONDS - $tstart - 3))
-   echo "MultiLogReg predict ict="$i" on "$1": "$tpredict >> times.txt
+   tstart=$(date +%s.%N)
+   ${CMD} -f ../algorithms/GLM-predict.dml \
+      --config conf/SystemDS-config.xml \
+      --stats \
+      --nvargs dfam=$DFAM vpow=-1 link=2 lpow=-1 fmt=csv X=$1_test B=${BASE}/b Y=$2_test M=${BASE}/m O=${BASE}/out.csv
+
+   tpredict=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+   echo "MultiLogReg predict ict="$i" on "$1": "$tpredict >> results/times.txt
 done
diff --git a/scripts/perftestDeprecated/runNaiveBayes.sh b/scripts/perftest/runNaiveBayes.sh
old mode 100644
new mode 100755
similarity index 53%
rename from scripts/perftestDeprecated/runNaiveBayes.sh
rename to scripts/perftest/runNaiveBayes.sh
index 1c7e9bf..88ce467
--- a/scripts/perftestDeprecated/runNaiveBayes.sh
+++ b/scripts/perftest/runNaiveBayes.sh
@@ -21,20 +21,27 @@
 #-------------------------------------------------------------
 set -e
 
-if [ "$5" == "SPARK" ]; then CMD="./sparkDML.sh "; DASH="-"; elif [ "$5" == "MR" ]; then CMD="hadoop jar SystemDS.jar " ; else CMD="echo " ; fi
-
+CMD=$5
 BASE=$4
 
-export HADOOP_CLIENT_OPTS="-Xmx2048m -Xms2048m -Xmn256m"
-
 #training
-tstart=$SECONDS
-${CMD} -f ../algorithms/naive-bayes.dml $DASH-explain $DASH-stats $DASH-nvargs X=$1 Y=$2 classes=$3 prior=${BASE}/prior conditionals=${BASE}/conditionals accuracy=${BASE}/debug_output fmt="csv"
-ttrain=$(($SECONDS - $tstart - 3))
-echo "NaiveBayes train on "$1": "$ttrain >> times.txt
+tstart=$(date +%s.%N)
+#${CMD} -f ../algorithms/naive-bayes.dml \
+${CMD} -f scripts/naive-bayes.dml \
+   --config conf/SystemDS-config.xml \
+   --stats \
+   --nvargs X=$1 Y=$2 prior=${BASE}/prior conditionals=${BASE}/conditionals fmt="csv"
+
+ttrain=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+echo "NaiveBayes train on "$1": "$ttrain >> results/times.txt
 
 #predict
-tstart=$SECONDS
-${CMD} -f ../algorithms/naive-bayes-predict.dml $DASH-explain $DASH-stats $DASH-nvargs X=$1_test Y=$2_test prior=${BASE}/prior conditionals=${BASE}/conditionals fmt="csv" probabilities=${BASE}/probabilities
-tpredict=$(($SECONDS - $tstart - 3))
-echo "NaiveBayes predict on "$1": "$tpredict >> times.txt
+tstart=$(date +%s.%N)
+#${CMD} -f ../algorithms/naive-bayes-predict.dml \
+${CMD} -f scripts/naive-bayes-predict.dml \
+   --config conf/SystemDS-config.xml \
+   --stats \
+   --nvargs X=$1_test Y=$2_test prior=${BASE}/prior conditionals=${BASE}/conditionals fmt="csv" probabilities=${BASE}/probabilities #accuracy=${BASE}/accuracy confusion=${BASE}/confusion
+
+tpredict=$(echo "$(date +%s.%N) - $tstart - .4" | bc)
+echo "NaiveBayes predict on "$1": "$tpredict >> results/times.txt
diff --git a/scripts/perftest/scripts/GLM.dml b/scripts/perftest/scripts/GLM.dml
new file mode 100755
index 0000000..783f63c
--- /dev/null
+++ b/scripts/perftest/scripts/GLM.dml
@@ -0,0 +1,49 @@
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+X = read($X);
+Y = read($Y);
+fileB = $B;
+fmtB = ifdef ($fmt, "text");
+
+distribution_type = ifdef ($dfam, 1);                # $dfam = 1;
+variance_as_power_of_the_mean = ifdef ($vpow, 0.0);  # $vpow = 0.0;
+link_type = ifdef ($link, 0);                        # $link = 0;
+link_as_power_of_the_mean = ifdef ($lpow, 1.0);      # $lpow = 1.0;
+bernoulli_No_label = ifdef ($yneg, 0.0);             # $yneg = 0.0;
+intercept_status = ifdef ($icpt, 0);                 # $icpt = 0;
+dispersion = ifdef ($disp, 0.0);                     # $disp = 0.0;
+regularization = ifdef ($reg, 0.0);                  # $reg  = 0.0;
+eps = ifdef ($tol, 0.000001);                        # $tol  = 0.000001;
+max_iteration_IRLS = ifdef ($moi, 200);              # $moi  = 200;
+max_iteration_CG = ifdef ($mii, 0);                  # $mii  = 0;
+
+variance_as_power_of_the_mean = as.double (variance_as_power_of_the_mean);
+link_as_power_of_the_mean = as.double (link_as_power_of_the_mean);
+bernoulli_No_label = as.double (bernoulli_No_label);
+dispersion = as.double (dispersion);
+eps = as.double (eps);
+
+beta = glm(X=X,Y=Y, dfam=distribution_type, vpow=variance_as_power_of_the_mean,
+        link=link_type, lpow=link_as_power_of_the_mean, yneg=bernoulli_No_label,
+        icpt=intercept_status, reg=regularization, tol=eps, moi=max_iteration_IRLS, mii=max_iteration_CG)
+
+write (beta, fileB, format=fmtB);
diff --git a/scripts/perftest/runAll.sh b/scripts/perftest/scripts/LinearRegCG.dml
similarity index 65%
copy from scripts/perftest/runAll.sh
copy to scripts/perftest/scripts/LinearRegCG.dml
index a168a51..9f10918 100755
--- a/scripts/perftest/runAll.sh
+++ b/scripts/perftest/scripts/LinearRegCG.dml
@@ -1,4 +1,3 @@
-#!/usr/bin/env bash
 #-------------------------------------------------------------
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -20,11 +19,19 @@
 #
 #-------------------------------------------------------------
 
+fileX = $X;
+fileY = $Y;
+fileB = $B;
+fmtB = ifdef ($fmt, "text");
 
-# Micro Benchmarks:
+intercept_status = ifdef ($icpt, 0);     # $icpt=0;
+tolerance = ifdef ($tol, 0.000001);      # $tol=0.000001;
+max_iteration = ifdef ($maxi, 0);        # $maxi=0;
+regularization = ifdef ($reg, 0.000001); # $reg=0.000001;
 
-./scripts/perftest/MatrixMult.sh
-./scripts/perftest/MatrixTranspose.sh
+X = read (fileX);
+y = read (fileY);
 
-# Algorithms Benchmarks:
+beta_out = lmCG(X = X, y = y, icpt = intercept_status, reg = regularization, tol = tolerance, maxi = max_iteration, verbose = TRUE)
 
+write (beta_out, fileB, format=fmtB);
diff --git a/scripts/perftest/runAll.sh b/scripts/perftest/scripts/LinearRegDS.dml
similarity index 72%
copy from scripts/perftest/runAll.sh
copy to scripts/perftest/scripts/LinearRegDS.dml
index a168a51..ad2c98c 100755
--- a/scripts/perftest/runAll.sh
+++ b/scripts/perftest/scripts/LinearRegDS.dml
@@ -1,4 +1,3 @@
-#!/usr/bin/env bash
 #-------------------------------------------------------------
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -20,11 +19,17 @@
 #
 #-------------------------------------------------------------
 
+fileX = $X;
+fileY = $Y;
+fileB = $B;
+fmtB  = ifdef ($fmt, "text");
 
-# Micro Benchmarks:
+intercept_status = ifdef ($icpt, 0);     # $icpt=0;
+regularization = ifdef ($reg, 0.000001); # $reg=0.000001;
 
-./scripts/perftest/MatrixMult.sh
-./scripts/perftest/MatrixTranspose.sh
+X = read (fileX);
+y = read (fileY);
 
-# Algorithms Benchmarks:
+beta_out = lmDS(X = X, y = y, icpt = intercept_status, reg = regularization, verbose = TRUE)
 
+write (beta_out, fileB, format=fmtB);
diff --git a/scripts/perftest/scripts/MM.dml b/scripts/perftest/scripts/MM.dml
old mode 100644
new mode 100755
diff --git a/scripts/perftest/runAll.sh b/scripts/perftest/scripts/MultiLogReg.dml
similarity index 61%
copy from scripts/perftest/runAll.sh
copy to scripts/perftest/scripts/MultiLogReg.dml
index a168a51..4e7ad46 100755
--- a/scripts/perftest/runAll.sh
+++ b/scripts/perftest/scripts/MultiLogReg.dml
@@ -1,4 +1,3 @@
-#!/usr/bin/env bash
 #-------------------------------------------------------------
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -20,11 +19,20 @@
 #
 #-------------------------------------------------------------
 
+fileX = $X;
+fileY = $Y;
+fileB = $B;
+fmtB = ifdef ($fmt, "text");
 
-# Micro Benchmarks:
+intercept_status = ifdef ($icpt, 0); # $icpt = 0;
+regularization = ifdef ($reg, 0.0);  # $reg  = 0.0;
+tol = ifdef ($tol, 0.000001);        # $tol  = 0.000001;
+maxiter = ifdef ($moi, 100);         # $moi  = 100;
+maxinneriter = ifdef ($mii, 0);      # $mii  = 0;
 
-./scripts/perftest/MatrixMult.sh
-./scripts/perftest/MatrixTranspose.sh
-
-# Algorithms Benchmarks:
+tol = as.double ($tol);
+X = read (fileX);
+Y_vec = read (fileY);
 
+B_out = multiLogReg(X = X, Y = Y_vec, icpt = intercept_status, tol = tol, reg = regularization, maxi = maxiter, maxii = maxinneriter, verbose = TRUE)
+write (B_out, fileB, format=fmtB);
diff --git a/scripts/perftestDeprecated/changeFormat.dml b/scripts/perftest/scripts/changeFormat.dml
old mode 100644
new mode 100755
similarity index 94%
rename from scripts/perftestDeprecated/changeFormat.dml
rename to scripts/perftest/scripts/changeFormat.dml
index 616d20f..e99374f
--- a/scripts/perftestDeprecated/changeFormat.dml
+++ b/scripts/perftest/scripts/changeFormat.dml
@@ -24,7 +24,7 @@ y = read($2);
 
 #create new multinomial label vector
 if($3>1){
-   y = round( (Rand(rows=nrow(y),cols=1, min=0, max=1)*$3)+0.5);
+  y = round((rand(rows=nrow(y), cols=1, min=0, max=1)*$3)+0.5);
 }
 
 write(X, $4, format=$6);
diff --git a/scripts/perftestDeprecated/extractTestData.dml b/scripts/perftest/scripts/extractTestData.dml
old mode 100644
new mode 100755
similarity index 88%
rename from scripts/perftestDeprecated/extractTestData.dml
rename to scripts/perftest/scripts/extractTestData.dml
index a31fcb4..49d465f
--- a/scripts/perftestDeprecated/extractTestData.dml
+++ b/scripts/perftest/scripts/extractTestData.dml
@@ -19,13 +19,15 @@
 #
 #-------------------------------------------------------------
 
-n = 5000;
-
 X = read($1);
 y = read($2);
 
-X = X[1:n,];
-y = y[1:n,];
+Percent_test = .2
+N_x = as.integer(nrow(X) * Percent_test);
+N_y = as.integer(nrow(y) * Percent_test);
+
+X = X[1:N_x,];
+y = y[1:N_y,];
 
 write(X, $3, format=$5);
 write(y, $4, format=$5);
diff --git a/scripts/perftest/scripts/l2-svm-predict.dml b/scripts/perftest/scripts/l2-svm-predict.dml
new file mode 100755
index 0000000..31db539
--- /dev/null
+++ b/scripts/perftest/scripts/l2-svm-predict.dml
@@ -0,0 +1,85 @@
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+cmdLine_Y = ifdef($Y, " ")
+cmdLine_confusion = ifdef($confusion, " ")
+cmdLine_accuracy = ifdef($accuracy, " ")
+cmdLine_scores = ifdef($scores, " ")
+cmdLine_scoring_only = ifdef($scoring_only, FALSE)
+cmdLine_fmt = ifdef($fmt, "text")
+
+X = read($X)
+
+w = read($model)
+
+dimensions = as.scalar(w[nrow(w),1])
+if(dimensions != ncol(X))
+  stop("Stopping due to invalid input: Model dimensions do not seem to match input data dimensions")
+
+intercept = as.scalar(w[nrow(w)-1,1])
+negative_label = as.scalar(w[nrow(w)-2,1])
+positive_label = as.scalar(w[nrow(w)-3,1])
+w = w[1:(nrow(w)-4),]
+
+[scores, Y] = l2svmPredict(X = X, W = w, verbose = TRUE)
+
+if(cmdLine_scores != " ")
+  write(scores, cmdLine_scores, format=cmdLine_fmt)
+
+if(!cmdLine_scoring_only){
+  Y = read(cmdLine_Y)
+
+  pred = (scores >= 0)
+  pred_labels = pred*positive_label + (1-pred)*negative_label
+  num_correct = sum(pred_labels == Y)
+  acc = 100*num_correct/nrow(X)
+
+  acc_str = "Accuracy (%): " + acc
+  print(acc_str)
+
+  if(cmdLine_accuracy != " ")
+    write(acc_str, cmdLine_accuracy)
+
+  if(cmdLine_confusion != " ") {
+    pred = 2*pred - 1
+    
+    if(negative_label != -1 | positive_label != +1)
+      Y = 2/(positive_label - negative_label)*Y - (negative_label + positive_label)/(positive_label - negative_label)
+
+    pred_is_minus = (pred == -1)
+    pred_is_plus = 1 - pred_is_minus
+    y_is_minus = (Y == -1)
+    y_is_plus = 1 - y_is_minus
+
+    check_min_y_minus = sum(pred_is_minus*y_is_minus)
+    check_min_y_plus = sum(pred_is_minus*y_is_plus)
+    check_max_y_minus = sum(pred_is_plus*y_is_minus)
+    check_max_y_plus = sum(pred_is_plus*y_is_plus)
+
+    confusion_mat = matrix(0, rows=2, cols=2)
+    confusion_mat[1,1] = check_min_y_minus
+    confusion_mat[1,2] = check_min_y_plus
+    confusion_mat[2,1] = check_max_y_minus
+    confusion_mat[2,2] = check_max_y_plus
+
+    write(confusion_mat, cmdLine_confusion, format="csv")
+  }
+}
diff --git a/scripts/perftest/scripts/m-svm-predict.dml b/scripts/perftest/scripts/m-svm-predict.dml
new file mode 100755
index 0000000..833aefc
--- /dev/null
+++ b/scripts/perftest/scripts/m-svm-predict.dml
@@ -0,0 +1,69 @@
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+cmdLine_Y = ifdef($Y, " ")
+cmdLine_confusion = ifdef($confusion, " ")
+cmdLine_accuracy = ifdef($accuracy, " ")
+cmdLine_scores = ifdef($scores, " ")
+cmdLine_scoring_only = ifdef($scoring_only, FALSE)
+cmdLine_fmt = ifdef($fmt, "text")
+
+X = read($X);
+W = read($model);
+
+dimensions = as.scalar(W[nrow(W),1])
+if(dimensions != ncol(X))
+  stop("Stopping due to invalid input: Model dimensions do not seem to match input data dimensions")
+
+intercept = as.scalar(W[nrow(W)-1,1])
+W = W[1:(nrow(W)-2),]
+
+N = nrow(X);
+num_classes = ncol(W)
+
+[scores, Y] = msvmPredict(X = X, W = W)
+
+if(cmdLine_scores != " ")
+  write(scores, cmdLine_scores, format=cmdLine_fmt);
+
+if(!cmdLine_scoring_only){
+  Y = read(cmdLine_Y);
+
+  if(min(Y) < 1)
+    stop("Stopping due to invalid argument: Label vector (Y) must be recoded")
+
+  pred = rowIndexMax(scores);
+  correct_percentage = sum((pred - Y) == 0) / N * 100;
+
+  acc_str = "Accuracy (%): " + correct_percentage
+  print(acc_str)
+  if(cmdLine_accuracy != " ")
+    write(acc_str, cmdLine_accuracy)
+
+  num_classes_ground_truth = max(Y)
+  if(num_classes < num_classes_ground_truth)
+    num_classes = num_classes_ground_truth
+
+  if(cmdLine_confusion != " "){
+    confusion_mat = table(Y, pred, num_classes, num_classes)
+    write(confusion_mat, cmdLine_confusion, format="csv")
+  }
+}
diff --git a/scripts/perftest/runAll.sh b/scripts/perftest/scripts/m-svm.dml
similarity index 65%
copy from scripts/perftest/runAll.sh
copy to scripts/perftest/scripts/m-svm.dml
index a168a51..028356e 100755
--- a/scripts/perftest/runAll.sh
+++ b/scripts/perftest/scripts/m-svm.dml
@@ -1,4 +1,3 @@
-#!/usr/bin/env bash
 #-------------------------------------------------------------
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -20,11 +19,22 @@
 #
 #-------------------------------------------------------------
 
+fmt = ifdef($fmt, "text")
+icpt = ifdef($icpt, 0)
+tol = ifdef($tol, 0.001)
+reg = ifdef($reg, 1.0)
+maxiter = ifdef($maxiter, 100)
 
-# Micro Benchmarks:
+tol = as.double ($tol);
+X = read($X)
+Y = read($Y)
 
-./scripts/perftest/MatrixMult.sh
-./scripts/perftest/MatrixTranspose.sh
+model = msvm(X = X, Y = Y, intercept = icpt, epsilon = tol, lambda = reg, maxIterations = maxiter, verbose = FALSE)
 
-# Algorithms Benchmarks:
+extra_model_params = matrix(0, rows=2, cols=ncol(model))
+extra_model_params[1, 1] = icpt
+extra_model_params[2, 1] = ncol(X)
 
+w = t(cbind(t(model), t(extra_model_params)))
+
+write(w, $model, format=fmt)
diff --git a/scripts/perftest/scripts/naive-bayes-predict.dml b/scripts/perftest/scripts/naive-bayes-predict.dml
new file mode 100755
index 0000000..e94e6eb
--- /dev/null
+++ b/scripts/perftest/scripts/naive-bayes-predict.dml
@@ -0,0 +1,71 @@
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+cmdLine_Y = ifdef($Y, " ")
+cmdLine_accuracy = ifdef($accuracy, " ")
+cmdLine_confusion = ifdef($confusion, " ")
+cmdLine_fmt = ifdef($fmt, "text")
+
+D = read($X)
+prior = read($prior)
+conditionals = read($conditionals)
+
+min_feature_val = min(D)
+if(min_feature_val < 0)
+  stop("Stopping due to invalid argument: Multinomial naive Bayes is meant for count-based feature values, minimum value in X is negative")
+
+# Depending on the algorithm used (built-in or one of the algorithm dml scripts), the prior has a additional row that needs to be removed
+num_rows_prior = nrow(prior)
+if(num_rows_prior == (nrow(conditionals) + 1))
+  prior = prior[1:num_rows_prior - 1]
+
+[log_probs, Y] = naiveBayesPredict(X=D, P=prior, C=conditionals)
+
+mx = rowMaxs(log_probs)
+ones = matrix(1, rows=1, cols=nrow(prior))
+probs = log_probs - mx %*% ones
+probs = exp(probs)/(rowSums(exp(probs)) %*% ones)
+write(probs, $probabilities, format=cmdLine_fmt)
+
+if(cmdLine_Y != " "){
+  C = read(cmdLine_Y)
+  if(min(C) < 1)
+    stop("Stopping due to invalid argument: Label vector (Y) must be recoded")
+
+  pred = rowIndexMax(log_probs)
+  numRows = nrow(D)
+  acc = sum(pred == C) / numRows * 100
+
+  acc_str = "Accuracy (%): " + acc
+  print(acc_str)
+  if(cmdLine_accuracy != " ")
+    write(acc, cmdLine_accuracy)
+
+  num_classes = nrow(prior)
+  num_classes_ground_truth = max(C)
+  if(num_classes < num_classes_ground_truth)
+    num_classes = num_classes_ground_truth
+
+  if(cmdLine_confusion != " "){
+    confusion_mat = table(pred, C, num_classes, num_classes)
+    write(confusion_mat, cmdLine_confusion, format="csv")
+  }
+}
diff --git a/scripts/perftest/runAll.sh b/scripts/perftest/scripts/naive-bayes.dml
similarity index 69%
copy from scripts/perftest/runAll.sh
copy to scripts/perftest/scripts/naive-bayes.dml
index a168a51..40f02f4 100755
--- a/scripts/perftest/runAll.sh
+++ b/scripts/perftest/scripts/naive-bayes.dml
@@ -1,4 +1,3 @@
-#!/usr/bin/env bash
 #-------------------------------------------------------------
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -20,11 +19,19 @@
 #
 #-------------------------------------------------------------
 
+# defaults
+laplaceCorrection = ifdef($laplace, 1)
+fmt = ifdef($fmt, "text")
 
-# Micro Benchmarks:
+# reading input args
+D = read($X)
+C = read($Y)
 
-./scripts/perftest/MatrixMult.sh
-./scripts/perftest/MatrixTranspose.sh
+[prior, classConditionals] = naiveBayes(D=D, C=C, laplace=laplaceCorrection, verbose = TRUE)
 
-# Algorithms Benchmarks:
+#extraModelParams = as.matrix(ncol(D))
+#prior = rbind(prior, extraModelParams)
 
+# write out the model
+write(prior, $prior, format=fmt);
+write(classConditionals, $conditionals, format=fmt);
diff --git a/scripts/perftest/scripts/transpose.dml b/scripts/perftest/scripts/transpose.dml
old mode 100644
new mode 100755
index ec5e0ac..2fb2f0d
--- a/scripts/perftest/scripts/transpose.dml
+++ b/scripts/perftest/scripts/transpose.dml
@@ -21,6 +21,6 @@
 
 x = rand(rows=$1, cols=$2, min= 0.0, max= 1.0, sparsity=$3, seed= 12)
 for(i in 1:$4) {
-    res = t(x) 
+  res = t(x) 
 }
 print(sum(res))
\ No newline at end of file
diff --git a/scripts/perftestDeprecated/genClusteringData.sh b/scripts/perftest/todo/genClusteringData.sh
similarity index 100%
rename from scripts/perftestDeprecated/genClusteringData.sh
rename to scripts/perftest/todo/genClusteringData.sh
diff --git a/scripts/perftestDeprecated/genDescriptiveStatisticsData.sh b/scripts/perftest/todo/genDescriptiveStatisticsData.sh
similarity index 100%
rename from scripts/perftestDeprecated/genDescriptiveStatisticsData.sh
rename to scripts/perftest/todo/genDescriptiveStatisticsData.sh
diff --git a/scripts/perftestDeprecated/genDimensionReductionData.sh b/scripts/perftest/todo/genDimensionReductionData.sh
similarity index 100%
rename from scripts/perftestDeprecated/genDimensionReductionData.sh
rename to scripts/perftest/todo/genDimensionReductionData.sh
diff --git a/scripts/perftestDeprecated/genRandLogRegData_LTStats.sh b/scripts/perftest/todo/genRandLogRegData_LTStats.sh
similarity index 100%
rename from scripts/perftestDeprecated/genRandLogRegData_LTStats.sh
rename to scripts/perftest/todo/genRandLogRegData_LTStats.sh
diff --git a/scripts/perftestDeprecated/genStratStatisticsData.sh b/scripts/perftest/todo/genStratStatisticsData.sh
similarity index 100%
rename from scripts/perftestDeprecated/genStratStatisticsData.sh
rename to scripts/perftest/todo/genStratStatisticsData.sh
diff --git a/scripts/perftestDeprecated/genTreeData.sh b/scripts/perftest/todo/genTreeData.sh
similarity index 100%
rename from scripts/perftestDeprecated/genTreeData.sh
rename to scripts/perftest/todo/genTreeData.sh
diff --git a/scripts/perftestDeprecated/runAllClustering.sh b/scripts/perftest/todo/runAllClustering.sh
similarity index 100%
rename from scripts/perftestDeprecated/runAllClustering.sh
rename to scripts/perftest/todo/runAllClustering.sh
diff --git a/scripts/perftestDeprecated/runAllDimensionReduction.sh b/scripts/perftest/todo/runAllDimensionReduction.sh
similarity index 100%
rename from scripts/perftestDeprecated/runAllDimensionReduction.sh
rename to scripts/perftest/todo/runAllDimensionReduction.sh
diff --git a/scripts/perftestDeprecated/runAllStats.sh b/scripts/perftest/todo/runAllStats.sh
similarity index 100%
rename from scripts/perftestDeprecated/runAllStats.sh
rename to scripts/perftest/todo/runAllStats.sh
diff --git a/scripts/perftestDeprecated/runAllTrees.sh b/scripts/perftest/todo/runAllTrees.sh
similarity index 100%
rename from scripts/perftestDeprecated/runAllTrees.sh
rename to scripts/perftest/todo/runAllTrees.sh
diff --git a/scripts/perftestDeprecated/runBivarStats.sh b/scripts/perftest/todo/runBivarStats.sh
similarity index 100%
rename from scripts/perftestDeprecated/runBivarStats.sh
rename to scripts/perftest/todo/runBivarStats.sh
diff --git a/scripts/perftestDeprecated/runDecTree.sh b/scripts/perftest/todo/runDecTree.sh
similarity index 100%
rename from scripts/perftestDeprecated/runDecTree.sh
rename to scripts/perftest/todo/runDecTree.sh
diff --git a/scripts/perftestDeprecated/runKmeans.sh b/scripts/perftest/todo/runKmeans.sh
similarity index 100%
rename from scripts/perftestDeprecated/runKmeans.sh
rename to scripts/perftest/todo/runKmeans.sh
diff --git a/scripts/perftestDeprecated/runPCA.sh b/scripts/perftest/todo/runPCA.sh
similarity index 100%
rename from scripts/perftestDeprecated/runPCA.sh
rename to scripts/perftest/todo/runPCA.sh
diff --git a/scripts/perftestDeprecated/runRandTree.sh b/scripts/perftest/todo/runRandTree.sh
similarity index 100%
rename from scripts/perftestDeprecated/runRandTree.sh
rename to scripts/perftest/todo/runRandTree.sh
diff --git a/scripts/perftestDeprecated/runStratStats.sh b/scripts/perftest/todo/runStratStats.sh
similarity index 100%
rename from scripts/perftestDeprecated/runStratStats.sh
rename to scripts/perftest/todo/runStratStats.sh
diff --git a/scripts/perftestDeprecated/runUnivarStats.sh b/scripts/perftest/todo/runUnivarStats.sh
similarity index 100%
rename from scripts/perftestDeprecated/runUnivarStats.sh
rename to scripts/perftest/todo/runUnivarStats.sh
diff --git a/scripts/perftestDeprecated/README.md b/scripts/perftestDeprecated/README.md
deleted file mode 100644
index cbc6eee..0000000
--- a/scripts/perftestDeprecated/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-
-HOW TO RUN THE PERFORMANCE SUITE
-================================
-
-Deprecated
-
-Create a directory <...> on target machine on cluster, and copy from
-repository SystemDS/system-ds: machine/cluster:
-
-   scripts/algorithms   to <...>/algorithms
-   scripts/datagen      to <...>/datagen
-   scripts/perftest     to <...>/perftest
-
-Also copy:
-
-   // Edit sparkDML and set SPARK_HOME and SYSTEMDS_ROOT.
-   scripts/sparkDML.sh     to <...>/perftest/
-   target/system-ds-5.0-SNAPSHOT.jar  to <...>/perftest/SystemDS.jar
-   test/config/SystemDS-config.xml to <...>/perftest/SystemDS-config.xml
-
-   chmod -R +x <...>/./*                        // Change permissions
-
-Customize in runAll*.sh to choose data sizes as well as in gen*Data.sh.
-
-Following alternative run modes are supported from <...>/perftest/
-
-   ./runAll.sh $1 $2                // run all test
-
-   ./runAll.sh myperftest SPARK     // example
-
-   $1 is used as a relative path in hdfs to store generated data,
-   intermediate results, etc. $2 can be MR, SPARK, or ECHO. ECHO is
-   meant for debugging the scripts as it just goes through all the
-   scripts and outputs the invoked command line parameters.
-
-   The scripts append to a trace/time file ./times.txt, and output log
-   files in folder ./logs/*
-
-   Below scripts can be invoked accordingly, e.g.
-
-   ./runAllBinomial.sh $1 $2
-   ./runAllClustering.sh $1 $2
-   ./runAllMultinomial.sh $1 $2
-   ./runAllRegression.sh $1 $2
-   ./runAllStats.sh $1 $2
-   ./runAllDimensionReduction.sh $1 $2
-
-   ./genBinomialData.sh $1 $2
-   ./genMultinomialData.sh $1 $2
-   ./genClusteringData.sh $1 $2
-   ./genDescriptiveStatisticsData.sh $1 $2
-   ./genStratStatisticsData.sh $1 $2
-   ./genDimensionReductionData.sh $1 $2
diff --git a/scripts/perftestDeprecated/genBinomialData.sh b/scripts/perftestDeprecated/genBinomialData.sh
deleted file mode 100644
index d691cbe..0000000
--- a/scripts/perftestDeprecated/genBinomialData.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/bash
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-if [ "$1" == "" -o "$2" == "" ]; then echo "Usage: $0 <hdfsDataDir> <MR | SPARK | ECHO>   e.g. $0 perftest SPARK" ; exit 1 ; fi
-if [ "$2" == "SPARK" ]; then CMD="./sparkDML.sh "; DASH="-"; elif [ "$2" == "MR" ]; then CMD="hadoop jar SystemDS.jar " ; else CMD="echo " ; fi
-
-
-BASE=$1/binomial
-
-FORMAT="binary" 
-DENSE_SP=0.9
-SPARSE_SP=0.01
-
-export HADOOP_CLIENT_OPTS="-Xmx2048m -Xms2048m -Xmn256m"
-
-
-#generate XS scenarios (80MB)
-${CMD} -f ../datagen/genRandData4LogisticRegression.dml $DASH-args 10000 1000 5 5 $BASE/w10k_1k_dense $BASE/X10k_1k_dense $BASE/y10k_1k_dense 1 0 $DENSE_SP $FORMAT 1
-${CMD} -f ../datagen/genRandData4LogisticRegression.dml $DASH-args 10000 1000 5 5 $BASE/w10k_1k_sparse $BASE/X10k_1k_sparse $BASE/y10k_1k_sparse 1 0 $SPARSE_SP $FORMAT 1
-${CMD} -f extractTestData.dml $DASH-args $BASE/X10k_1k_dense $BASE/y10k_1k_dense $BASE/X10k_1k_dense_test $BASE/y10k_1k_dense_test $FORMAT
-${CMD} -f extractTestData.dml $DASH-args $BASE/X10k_1k_sparse $BASE/y10k_1k_sparse $BASE/X10k_1k_sparse_test $BASE/y10k_1k_sparse_test $FORMAT
-
-##generate S scenarios (800MB)
-#${CMD} -f ../datagen/genRandData4LogisticRegression.dml $DASH-args 100000 1000 5 5 $BASE/w100k_1k_dense $BASE/X100k_1k_dense $BASE/y100k_1k_dense 1 0 $DENSE_SP $FORMAT 1
-#${CMD} -f ../datagen/genRandData4LogisticRegression.dml $DASH-args 100000 1000 5 5 $BASE/w100k_1k_sparse $BASE/X100k_1k_sparse $BASE/y100k_1k_sparse 1 0 $SPARSE_SP $FORMAT 1
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X100k_1k_dense $BASE/y100k_1k_dense $BASE/X100k_1k_dense_test $BASE/y100k_1k_dense_test $FORMAT
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X100k_1k_sparse $BASE/y100k_1k_sparse $BASE/X100k_1k_sparse_test $BASE/y100k_1k_sparse_test $FORMAT
-#
-##generate M scenarios (8GB)
-#${CMD} -f ../datagen/genRandData4LogisticRegression.dml $DASH-args 1000000 1000 5 5 $BASE/w1M_1k_dense $BASE/X1M_1k_dense $BASE/y1M_1k_dense 1 0 $DENSE_SP $FORMAT 1
-#${CMD} -f ../datagen/genRandData4LogisticRegression.dml $DASH-args 1000000 1000 5 5 $BASE/w1M_1k_sparse $BASE/X1M_1k_sparse $BASE/y1M_1k_sparse 1 0 $SPARSE_SP $FORMAT 1
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X1M_1k_dense $BASE/y1M_1k_dense $BASE/X1M_1k_dense_test $BASE/y1M_1k_dense_test $FORMAT
-#${CMD}-f extractTestData.dml $DASH-args $BASE/X1M_1k_sparse $BASE/y1M_1k_sparse $BASE/X1M_1k_sparse_test $BASE/y1M_1k_sparse_test $FORMAT
-#
-##generate L scenarios (80GB)
-#${CMD} -f ../datagen/genRandData4LogisticRegression.dml $DASH-args 10000000 1000 5 5 $BASE/w10M_1k_dense $BASE/X10M_1k_dense $BASE/y10M_1k_dense 1 0 $DENSE_SP $FORMAT 1
-#${CMD} -f ../datagen/genRandData4LogisticRegression.dml $DASH-args 10000000 1000 5 5 $BASE/w10M_1k_sparse $BASE/X10M_1k_sparse $BASE/y10M_1k_sparse 1 0 $SPARSE_SP $FORMAT 1
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X10M_1k_dense $BASE/y10M_1k_dense $BASE/X10M_1k_dense_test $BASE/y10M_1k_dense_test $FORMAT
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X10M_1k_sparse $BASE/y10M_1k_sparse $BASE/X10M_1k_sparse_test $BASE/y10M_1k_sparse_test $FORMAT
-#
-##generate XL scenarios (800GB)
-#${CMD} -f ../datagen/genRandData4LogisticRegression.dml $DASH-args 100000000 1000 5 5 $BASE/w100M_1k_dense $BASE/X100M_1k_dense $BASE/y100M_1k_dense 1 0 $DENSE_SP $FORMAT 1
-#${CMD} -f ../datagen/genRandData4LogisticRegression.dml $DASH-args 100000000 1000 5 5 $BASE/w100M_1k_sparse $BASE/X100M_1k_sparse $BASE/y100M_1k_sparse 1 0 $SPARSE_SP $FORMAT 1
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X100M_1k_dense $BASE/y100M_1k_dense $BASE/X100M_1k_dense_test $BASE/y100M_1k_dense_test $FORMAT
-#${CMD} -f extractTestData.dml $DASH-args $BASE/X100M_1k_sparse $BASE/y100M_1k_sparse $BASE/X100M_1k_sparse_test $BASE/y100M_1k_sparse_test $FORMAT
-#
-###generate KDD scenario (csv would be infeasible)
-##${CMD} -f changeFormat.dml $DASH-args mboehm/data/rdata_kdd2010/X mboehm/data/rdata_kdd2010/y 1 $BASE/X_KDD $BASE/y_KDD "text"
-##${CMD} -f extractTestData.dml $DASH-args $BASE/X_KDD $BASE/y_KDD $BASE/X_KDD_test $BASE/y_KDD_test "text"
-##${CMD} -f changeFormat.dml $DASH-args /user/biadmin/statiko/rdata_kdd2010/X /user/biadmin/statiko/rdata_kdd2010/y 150 $BASE/X_KDD $BASE/y_KDD "text"
-##${CMD} -f extractTestData.dml $DASH-args $BASE/X_KDD $BASE/y_KDD $BASE/X_KDD_test $BASE/y_KDD_test "text"
-
diff --git a/scripts/perftestDeprecated/runAll.sh b/scripts/perftestDeprecated/runAll.sh
deleted file mode 100644
index 2553b38..0000000
--- a/scripts/perftestDeprecated/runAll.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash 
-#-------------------------------------------------------------
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#-------------------------------------------------------------
-
-if [ "$1" == "" -o "$2" == "" ]; then  echo "Usage: $0 <hdfsDataDir> <MR | SPARK | ECHO>   e.g. $0 perftest SPARK" ; exit 1 ; fi
-
-#init time measurement
-date >> times.txt
-
-./runAllBinomial.sh $1 $2
-./runAllMultinomial.sh $1 $2
-./runAllRegression.sh $1 $2
-./runAllStats.sh $1 $2
-./runAllClustering.sh $1 $2
-
-# add stepwise Linear 
-# add stepwise GLM
-#./runAllTrees $1 $2
-# add randomForest
-#./runAllDimensionReduction $1 $2
-#./runAllMatrixFactorization $1 $2
-#ALS
-#./runAllSurvival $1 $2
-#KaplanMeier
-#Cox
-
-
-
-
-
-