PredictiveEcology / SpaDES

R package for developing and running Spatial Discrete Event Simulation models
https://spades.predictiveecology.org
Other
55 stars 21 forks source link

simInit() fails with "Error in eval(...) : could not find function "enableJIT"" message #336

Closed GlennSutherland closed 7 years ago

GlennSutherland commented 7 years ago

The below is not a SpaDES issue, but may occur when running SpaDES.

Since ~ Feb. 20, 2017, a previously working module (executed on a Mac - macOS Sierra 10.12.3) started failing with the above message under R.3.3.2 and SpaDES 1.3.1.9047. The problem could not be replicated on Windows (or other OSs; see comment below). The source of the problem appears to be a dependency somewhere in a non-SpaDES package that is not extracting the enableJIT ("just-in-time" code execution) library from the base-R compiler package.

The workaround is to explicitly call library(compiler) in the script calling your module.

This appears not to be a general problem, and may be quite installation/machine-specific, and may also be ephemeral.

achubaty commented 7 years ago

Note: I could not replicate this on Ubuntu (16.04.2), Windows 7, nor macOS (Sierra 10.12.3).

GlennSutherland commented 7 years ago

Thanks Alex;

I made an edit to my post to make it clearer right up front that this is not an issue with SpaDES; only could be exposed when running SpaDES.

Glenn