27.6 ICALL, random streams, threads, and memory
Simulation evaluates model code with ICALL=4, matching NONMEM simulation intent. Random streams are derived from the master seed, replicate, and subject so results are bit-for-bit independent of --threads. OMEGA and SIGMA must be positive semidefinite; invalid simulation matrices are refused rather than silently replaced.
Novice translation
This topic changes three practical decisions in a predictive-check review. First, m3 or other likelihood models need an ICALL=4 branch that returns a simulatable Y and clears F_FLAG. Second, in-memory simulated observations use roughly 4 bytes × replicates × observations before overhead; --write-sims adds potentially large disk output. Third, thread count changes elapsed time, not the random result, but software version and seed remain part of reproducibility. Keep those decisions separate: one defines what is simulated or summarised, another controls how evidence is displayed, and the last controls what conclusion the evidence can support. A reviewer should be able to reproduce each decision from the resolved settings and numerical tables, not infer it from the appearance of the figure.
What to understand
- M3 or other likelihood models need an ICALL=4 branch that returns a simulatable Y and clears F_FLAG.
- In-memory simulated observations use roughly 4 bytes × replicates × observations before overhead;
--write-simsadds potentially large disk output. - Thread count changes elapsed time, not the random result, but software version and seed remain part of reproducibility.
Practical interpretation
Estimate memory and output size before running thousands of replicates over a very large analysis dataset.
Evidence to retain
For icall, random streams, threads, and memory, retain the issued command, vpc_settings.vpc, the source model/data/result identifiers, seed and replicate count, the relevant CSV/JSON fields, warnings and notes, and the exact figure used for interpretation. Record any sensitivity run that changed the conclusion. If an option was selected after seeing the data, label that analysis exploratory. This evidence separates a reproducible diagnostic decision from a visual impression and lets another pharmacometrician check counts, transformations, exclusions, and uncertainty assumptions.
Common mistakes
- Using estimation-only F_FLAG logic during simulation
- Benchmarking without recording threads
- Writing simulations unintentionally
Page checklist
- Verify ICALL branch
- Set explicit seed
- Plan memory/disk
- Test thread invariance when qualifying
Further reading
See previous page, next page, complete VPC command and settings index.