
Start a warm Docker pool for LANDIS-II calibration
landis_pool_start.RdSpawns n detached containers from image, each bind-mounting scratch_root
to /scratch inside. Each container runs a sleep-based busy loop that
responds to docker stop by exiting cleanly. The intended workflow is to
dispatch many landis_pool_exec() calls to the pool, then call
landis_pool_stop() to tear it down – typically via on.exit() in the
calling driver.
Usage
landis_pool_start(
n,
image = NULL,
scratch_root,
cpu_limit = 4,
mem_limit = "8g",
pull = FALSE,
name_prefix = NULL
)Arguments
- n
Integer. Number of pool containers to start. Typically the number of parallel DEoptim workers.
- image
Character or NULL. Docker image reference. NULL =
getOption("landisutils.docker.image").- scratch_root
Character. Host directory bind-mounted to
/scratchinside every container. Must be a stable absolute path. All per-trial directories used bylandis_pool_exec()must be SUBDIRECTORIES of this.- cpu_limit
Numeric or NULL. Per-container
--cpuscap. Default 4.- mem_limit
Character or NULL. Per-container
--memorycap. Default"8g".- pull
Logical. When TRUE,
docker pullthe image before starting.- name_prefix
Character or NULL. Optional prefix for the container name; the rest is auto-generated to avoid collisions across concurrent pools.
Value
A list with names (container names), image, scratch_root, n,
started_at, and digest (image RepoDigest if available).
See also
landis_pool_exec(), landis_pool_stop(), landis_run_docker()
Other LANDIS-II execution helpers:
host_cpu_info(),
landis_find(),
landis_find_docker(),
landis_pool_exec(),
landis_pool_restart_one(),
landis_pool_stop(),
landis_replicate(),
landis_run_docker(),
landis_run_local(),
read_landis_resource_logs(),
tar_landis(),
write_landis_scenario_file()