rawResultsRow()’s
minimization_successful column, which previously reported
failure (0) for essentially every real fit. The fallback
heuristic treated any non-empty fit$message as a failure
signal, but nlmixr2est fit objects populate
$message with the optimizer’s exit text on success too
(e.g. "Normal exit from bobyqa"), and never carry the
$minimization_successful field the primary check looked
for. The fallback now uses fit$convergence (0 = success,
mirroring the underlying optimizer’s
ierr/status code) instead..withWorkerPlan() now guards against requesting more
parallel OS threads than the machine has: whenever more than one worker
is involved, it checks the effective worker count (from
workers, or from the ambient future plan when
workers = NULL) times the effective rxode2 thread count per
worker (from the new rxThreads argument, or from
rxode2::getRxThreads() when unspecified) against the total
physical core count (parallel::detectCores()), and aborts
with a clear message before evaluating anything if the product would
exceed it. A single worker is never subject to this check..withWorkerPlan() with workers > 1 or
workers = "auto" that do not also set
rxThreads will, on most real multi-core machines, now abort
where they previously ran silently oversubscribed. Set
rxThreads explicitly (e.g. rxThreads = 1) to
restore the prior behavior.resolveRxThreads(workers, rxThreads) resolves the
effective rxode2 thread count for a given
workers/rxThreads combination, validating both
arguments..plap() gained an rxThreads argument that
propagates the resolved thread count into every task (whether it runs in
the main process or a multisession worker) and restores
each worker’s own prior setting afterward, so persistent workers reused
across calls don’t leak state between them.
.withWorkerPlan() also best-effort broadcasts the resolved
thread count to every worker in the active plan on its own, so callers
that don’t route rxThreads through their own
.plap() calls still get an accurate thread count
applied.Added experimental shared raw-results helpers
(rawResultsSchema(), rawResultsRow(),
writeRawResults(), readRawResults(),
parseRawResultsParams(), and
setupRawResultsFilter()) plus run-cache helpers
(resolveRunDir(), readRunState(),
writeRunState(), taskCache(),
pendingTasks(), withRunSeed(), and
deriveFitName()) for downstream nlmixr2 extension
packages.
Initial package largely cloned from nlmixr2extra,
providing shared worker-plan helpers, covariance utilities,
equation-printing methods, reexports, and the theoFitOde
package data used by the new extension packages.