alan-turing-institute / network-comparison

An R package implementing the NetEMD and NetDis network comparison measures
MIT License
14 stars 3 forks source link

Avoid parallel processing error on Windows #52

Closed martintoreilly closed 7 years ago

martintoreilly commented 7 years ago

Description

The mcmapply function we use for parallel processing on a single machine relies on system level forking, which is only supported by unix-like systems. This means it will work on Linux and OSX, but not Windows. On Windows, calling mcmapply with mc.cores > 1 throws an error.

martintoreilly commented 7 years ago

Error message on Appveyor Windows-based CI platform is 'mc.cores' > 1 is not supported on Windows. Therefore we will try the following everywhere that uses mcmapply (currently only gdd_for_all_graphs).

Tested in commit 4414a9c.

martintoreilly commented 7 years ago

Build passed on Appveyor so closing issue. Opening issue #53 to look into supporting more than one thread on Windows in future. README updated in commit 316e4da.

martintoreilly commented 7 years ago

Additional fix in commit c20c729. net_emds_for_all_graphs function also calls mcmapply but had no tests, so wasn't picked up by Appveyor CI build.

martintoreilly commented 7 years ago

Build passed on Appveyor so re-closing issue.