braverock / quantstrat

283 stars 114 forks source link

[R-Forge #5790] apply.paramset() not working with doParallel under Windows #25

Closed joshuaulrich closed 5 years ago

joshuaulrich commented 8 years ago

Submitted by: Jonathan Owen Assigned to: Joshua Ulrich R-Forge link

Within apply.paramset(), the applyStrategy() function throws an error with the get(symbol) call, as it cannot find the instrument data. The fix appears to be implementing logic similar to that used in applyParameter(). Here the symbol names are passed to the to the foreach function via .export and then assigned to the .GlobalEnv within the foreach call. This changes appears to resolve the issue on Windows but I'm unable to test for other backends.

Followups:

Date: 2014-11-06 19:34 Sender: Jonathan Owen I've attached a diff file with some proposed fixes.

Date: 2014-09-13 23:30 Sender: Joshua Ulrich Attempted to fix in r1631.

Date: 2014-09-13 23:00 Sender: Joshua Ulrich doParallel also does not work under Ubuntu (when using a socket cluster) for the same reason. I'll test this patch.

Date: 2014-07-01 13:21 Sender: Jonathan Owen I've attached a file that includes my proposed changes for apply.paramset(), which includes a fix for 5787 and 5790.Sorry, this is my first real use of R-Forge. The network I'm using doesn't allow access to svn, so I'm actually using a git version of this project (R-Finance/quantstrat) to view code and test changes.

Date: 2014-07-01 13:11 Sender: Brian Peterson Jonathan, Thank you for the report. It would be faster for us to fix the problems you're reporting if you attached proposed patches. That allows us to more quickly evaluate and apply the patch. Regards,Brian

braverock commented 5 years ago

This is stale. doParallel works under Ubuntu and under Windows. Closing. We can open a new issue with new details if that is necessary.