-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output for 3.1.1) Parallel for loops with foreach #2
Comments
Hmm, not sure what the problem is here. When I run the following code (see library(doParallel) out <- foreach(i = 1:30, .combine = c) %dopar% { On Fri, Feb 12, 2016 at 11:08 AM, Chris Kennedy notifications@github.com
|
Hmm, trying out your code:
So it seems to be GUI-specific, at least on OSX. |
Hi Chris,
Reviewing this material again, and one thing I noticed is that example 3.1.1 has the cat output within a foreach and says:
"(Note that the printed statements from cat are not showing up in the creation of this document but should show if you run the code.)"
When I run the code I don't get any cat output, which is consistent with what I've gotten in my own foreach loops and read online about foreach discarding printed output. This is for my system at least, which is R 3.2.3 on OSX 10.11 via RStudio 0.99.878. I've seen the same thing on Ubuntu via BCE-fall-2015.
I did find that creating a cluster via doSNOW and specifying the outfile="" option per http://stackoverflow.com/a/26519566/2463900 works though.
Here's the code I used:
Looks like it works fine via doParallel too, which doesn't keep the processes maxed out like doSnow does for me.
Best,
Chris
The text was updated successfully, but these errors were encountered: