[Blotter-commits] r1109 - pkg/quantstrat/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jul 24 17:10:59 CEST 2012
Author: opentrades
Date: 2012-07-24 17:10:59 +0200 (Tue, 24 Jul 2012)
New Revision: 1109
Modified:
pkg/quantstrat/R/parameters.R
Log:
now only cleaning .blotter in foreach if not DoSEQ registered as parallel backend
Modified: pkg/quantstrat/R/parameters.R
===================================================================
--- pkg/quantstrat/R/parameters.R 2012-07-24 14:21:44 UTC (rev 1108)
+++ pkg/quantstrat/R/parameters.R 2012-07-24 15:10:59 UTC (rev 1109)
@@ -484,8 +484,11 @@
# loops must be run with an empty .blotter environment each, or .blotter appears to accumulate portfolios and accounts
# and passes them from one loop to the next on each CPU - JH July 2012
- rm(list=ls(pos=.blotter), pos=.blotter)
- gc(verbose=verbose)
+ if (getDoParRegistered() && getDoParWorkers()>1)
+ {
+ rm(list=ls(pos=.blotter), pos=.blotter)
+ gc(verbose=verbose)
+ }
testPack<-list()
More information about the Blotter-commits
mailing list