Skip to content
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

Snakes and Ladders needs Function definition in Windows #19

Open
aegerton opened this issue May 2, 2020 · 0 comments
Open

Snakes and Ladders needs Function definition in Windows #19

aegerton opened this issue May 2, 2020 · 0 comments

Comments

@aegerton
Copy link

aegerton commented May 2, 2020

When I run the Snakes and Ladders example on Windows with the following code;-

cl = makeCluster(4)
parSapply(cl, 1:N, snakes_ladders)

I get the following error message;-

Error in checkForRemoteErrors(val) : 
  4 nodes produced errors; first error: could not find function "move"

Researching further elsewhere, I seem to need the following code in addition when using Windows;-

clusterExport(cl, list("move", "check_snake", "check_ladders", "snakes_ladders"))

Something about under Windows, "Parallel Socket Cluster (PSOCK) starting out with only the base packages loaded, whereas on Mac/Linux it automatically contains all environment variables" (https://stackoverflow.com/questions/12532257/could-not-find-function-inside-clusterapply) . Is that right, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant