osparcomm / HARSAT

Harmonized Regional Seas Assessment Tool
https://osparcomm.github.io/HARSAT/
Other
0 stars 5 forks source link

Parallel code may act oddly when run during development #404

Open morungos opened 9 months ago

morungos commented 9 months ago

This was observed during #382, and there is more information there.

The effect is that when using this code using devtools and still having installed the package some time, there may be occasions where parallel code starts using the installed version of the package on worker nodes, but the development version in the main process. This leads to breaking behaviour when using parallel = TRUE.

It is not really a bug, in the sense it will only manifest when the package is used in odd ways, but it would be nice if we could resolve it anyways. That probably involves a slightly more subtle environment detection when setting up a parallel cluster.

morungos commented 8 months ago

There might be a simpler resolution: rather than attempt to do funny environment detection, simply check the main node and worker node version numbers, and throw errors if they don't match up.