You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by de...@apache.org on 2016/03/07 08:46:46 UTC
[2/2] incubator-systemml git commit: [SYSTEMML-524] Document turning
off parfor parallelization in DML Lang Ref
[SYSTEMML-524] Document turning off parfor parallelization in DML Lang Ref
Closes #75.
Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/5619b91d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/5619b91d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/5619b91d
Branch: refs/heads/gh-pages
Commit: 5619b91dcf2272dc0c18bbca4f1ecf6e267438f9
Parents: d826bdd
Author: Deron Eriksson <de...@us.ibm.com>
Authored: Sun Mar 6 23:41:54 2016 -0800
Committer: Deron Eriksson <de...@us.ibm.com>
Committed: Sun Mar 6 23:41:54 2016 -0800
----------------------------------------------------------------------
dml-language-reference.md | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/5619b91d/dml-language-reference.md
----------------------------------------------------------------------
diff --git a/dml-language-reference.md b/dml-language-reference.md
index 2317d71..64fd950 100644
--- a/dml-language-reference.md
+++ b/dml-language-reference.md
@@ -361,7 +361,7 @@ The syntax and semantics of a `parfor` (parallel `for`) statement are equivalent
<task_size> is an arbitrary integer number
<data_partitioning_mode> is one of the following tokens: NONE LOCAL REMOTE_MR
<result_merge_mode> is one of the following tokens: LOCAL_MEM LOCAL_FILE LOCAL_AUTOMATIC REMOTE_MR
- <optimization_mode> is one of the following tokens: NONE RULEBASED HEURISTIC GREEDY FULL_DP
+ <optimization_mode> is one of the following tokens: NONE CONSTRAINED RULEBASED HEURISTIC GREEDY FULL_DP
If any of these parameters is not specified, the following respective defaults are used: `check = 1`, `par = [number of virtual processors on master node]`, `mode = LOCAL`, `taskpartitioner = FIXED`, `tasksize = 1`, `datapartitioner = NONE`, `resultmerge = LOCAL_AUTOMATIC`, `opt = RULEBASED`.
@@ -394,6 +394,14 @@ the `check = 0` option.
ms[,(v-1)*3+1:v*3] = mv
}
+While developing DML scripts or debugging, it can be useful to **turn off `parfor` parallelization**. This can be accomplished in the following
+three ways:
+
+1. Replace `parfor()` with `for()`. Since `parfor` is derived from `for`, you can always use `for` wherever you can use `parfor`.
+2. `parfor(opt = NONE, par = 1, ...)`. This disables optimization, uses defaults, and overwrites the specified parameters.
+3. `parfor(opt = CONSTRAINED, par = 1, ...)`. This optimizes using the specified parameters.
+
+
### User-Defined Function (UDF)