PredictiveEcology / climateData

Utilities for working with North American climate data from 'ClimateNA' https://climatena.ca
GNU General Public License v3.0
0 stars 1 forks source link

use different parallel backend #11

Closed achubaty closed 4 months ago

achubaty commented 6 months ago

parLapply() is currently used in buildClimateMosaics() and buildClimateMosaicsNormals(), but is less flexible for users -- e.g., user on windows can't currently avoid creating a cluster to run things sequentially.

consider switching over to e.g., future.apply to allow the user to specify future plan 'sequential' or 'callr' etc.

achubaty commented 5 months ago

@ianmseddy @eliotmcintire this is now implemented and working in package tests. i will continue testing in projects, and make corresponding tweaks as needed to the canClimateData module.

setting options(climateData.parallel.backend = "future") lets the user set future::plan() how they please in their main script, without needing to create and pass a parallel cluster object (cl) using the "parallel" backend approach (which is still default for now)