Switch multi-core to parallel package #151
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @richarddmorey,
I started playing around with the code on my fork because I was frustrated that there was no multi-core option on Windows machines (I am working on Linux myself, but collaborating with Windows folks and sharing dynamic documents with them). I originally intended to implement a multi-core option for Windows users, and therefore switched to the
parallel
package that provides multi-core facilities on Windows and Unix-alikes, and is shipped with base R. Unfortunately, the parallel package only provides PSOCK clusters on Windows, and these turned out to hamper performance (compared to single-core performance).Therefore, I again switched off the multi-core option on Windows and moved to fork clusters for Unix-alikes.
While I failed my ultimate goal of providing a multi-core option for Windows users, I found that my new implementation comes with some benefits for users of unix-alikes, so I thought it might be worthwhile to adopt the changes.
BayesFactor
ready for HPC computing.foreach
anddoMC
are not necessary, anymore.I don't know if I missed something important, so feel free to dismiss the code changes suggested here. ;)
Here is an example of how to run code on a pre-specified cluster: