traitecoevo / plant

Trait-Driven Models of Ecology and Evolution :evergreen_tree:
https://traitecoevo.github.io/plant
53 stars 20 forks source link

Set default compilation to -O2 for faster run times #365

Closed dfalster closed 1 year ago

dfalster commented 1 year ago

Addresses slow run times identified in #346. Using pkgbuild::compile_dll() has by default debug=TRUE which turns off optimisation in compiler

aornugent commented 1 year ago

Some numerical instability between compiler flags. Ubuntu and Windows didn't seem to care, so maybe it's a clang thing.

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-strategy-ff16w.R:103:3'): Rainfall spline basic run ──────────
out$offspring_production not equal to 16.88961056463.
1/1 mismatches
[1] 16.9 - 16.9 == -0.000172

[ FAIL 1 | WARN 3 | SKIP 0 | PASS 2205 ]