R Under development (unstable) (2026-10-14 r90673 ucrt) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(babelmixr2) > > # Test thread policy: cap rxode2 threads to 2 on CRAN (two-core policy) and > # force serial testthat workers on CI/CRAN (a single parallel > # worker only adds the callr message pipe, which base64-serializes large > # objects inlined in an erroring test's backtrace and can blow R's 2GB string > # cap). Locally, everything is managed normally. > .onCran <- !identical(Sys.getenv("NOT_CRAN"), "true") > .onCI <- isTRUE(as.logical(Sys.getenv("CI", "false"))) > > if (.onCI || .onCran) { + options(Ncpus = 1L) + Sys.setenv(TESTTHAT_CPUS = "1") + Sys.setenv(TESTTHAT_PARALLEL = "FALSE") + } > if (.onCran && requireNamespace("rxode2", quietly = TRUE)) { + rxode2::setRxThreads(2L) + } > > # ------------------------------------------------------------------------- > # Fast / slow test partitioning (mirrors nlmixr2est's tests/testthat.R) > # > # The estimation tests (full SAEM/nlmer/pseudoOptim/PopED fits and the > # nonmem2rx/monolix2rx file conversions) dominate the suite wall time. On > # push/PR CI, R-CMD-check runs only the "essential" (fast) subset -- every > # test file EXCEPT the slow ones in .slowBatches below. The slow files run > # separately, one batch at a time, in a slow-tests workflow that sets > # BABELMIXR2_TEST_BATCH=. > # > # Names are the test file basename with the leading "test-" and trailing > # ".R" removed (what testthat's `filter` matches). Locally and on CRAN the > # filter is NULL so everything runs (on CRAN the estimation files skip > # themselves via skip_on_cran()). > # ------------------------------------------------------------------------- > .slowBatches <- list( + # batch 1 -- the SAEM comparison fits (direct saemix + nlmixr2 saemix), + # by far the heaviest file. + c("saemix"), + # batch 2 -- nonmem2rx/monolix2rx conversions + PopED design fits. + c("nonmem-read", "monolix-read", "poped", "as-nlmixr2"), + # batch 3 -- NONMEM/Monolix translation stress test (inst/stress) and + # the nlmixr2lib model sweep. + c("nonmem-monolix-stress", "nonmem-monolix-nlmixr2lib") + ) > .slowAll <- unlist(.slowBatches) > > .batch <- Sys.getenv("BABELMIXR2_TEST_BATCH") > > .filter <- NULL > if (nzchar(.batch)) { + # Slow-batch mode: run ONLY this batch's slow files. + .b <- suppressWarnings(as.integer(.batch)) + if (is.na(.b) || .b < 1L || .b > length(.slowBatches)) { + stop(sprintf("BABELMIXR2_TEST_BATCH=%s out of range (1..%d)", + .batch, length(.slowBatches))) + } + .files <- .slowBatches[[.b]] + .filter <- if (length(.files) == 0L) { + "^$" # empty batch: match nothing + } else { + paste0("^(", paste(.files, collapse = "|"), ")$") + } + } else if (.onCI && !.onCran && length(.slowAll) > 0L) { + # Essential subset on push/PR CI: everything EXCEPT the slow files. + .filter <- paste0("^(?!(", paste(.slowAll, collapse = "|"), ")$)") + } > # Locally (and on CRAN) .filter stays NULL -> run everything. > > test_check("babelmixr2", stop_on_failure = FALSE, filter = .filter, perl = TRUE) > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done i change initial estimate of `tv` to `30` i change initial estimate of `eta.v` to `4` i fix `tka` to `0.45` i change initial estimate of `tka` to `0.45` i change initial estimate of `eta.ka` to `0.6` i add covariance between `eta.cl` and `eta.ka` with initial estimate `0.01` i change initial estimate of `eta.cl` to `0.3` i change initial estimate of `temax` to `0` i parameter labels from comments will be replaced by 'label()' i mu2 item: Rx_pow_di(WT, 2) > significant model change detected > removed from model: '$muRefFinal', '$timeVaryingCovariates' i writing monolix files i done i run Monolix manually and rerun nlmixr() i mu2 item: Rx_pow_di(WT, 2) > significant model change detected > removed from model: '$muRefFinal', '$timeVaryingCovariates' i leaving alone monolix files because 'monolixTest-monolix.txt' is present i writing monolix files i done i run Monolix manually and rerun nlmixr() i writing monolix files i done i run Monolix manually and rerun nlmixr() i add covariate `cl.age` i add covariate `AGE` i promote `cl.age` to population parameter with initial estimate 0 i change initial estimate of `cl.age` to `0` i add covariate `CRCL` > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done i renamed model variable 'ipre' to 'RXR1' because 'IPRE' collides with a NONMEM reserved name i renamed model variable 'f2' to 'RXR2' because 'F2' collides with a NONMEM reserved name i renamed model variable 'f3' to 'RXR3' because 'F3' collides with a NONMEM reserved name > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > finding duplicate expressions in EBE model... > compiling EBE model... v done > Calculating residuals/tables v done > compress origData in nlmixr2 object, save 1176 > compress parHistData in nlmixr2 object, save 2472 > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done i writing nonmem files i done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > calculate sensitivities > calculate d(f)/d(eta) > finding duplicate expressions in inner model... > finding duplicate expressions in EBE model... > compiling inner model... v done > finding duplicate expressions in FD model... > compiling EBE model... v done > compiling events FD model... v done [====|====|====|====|====|====|====|====|====|====] 0:03:48 > compress origData in nlmixr2 object, save 27816 Updated original fit object f warning: eig_sym(): given matrix is not symmetric > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done i renamed model variable 'alag' to 'RXR1' because 'ALAG' collides with a NONMEM reserved name i writing nonmem files i done i only exported NONMEM control stream/data > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done i renamed model variable 'q' to 'RXR1' because 'Q' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR2' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR3' because 'B' collides with a NONMEM reserved name > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'c' to 'RXR1' because 'C' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR3' because 'A' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'c' to 'RXR3' because 'C' collides with a NONMEM reserved name i renamed model variable 'd' to 'RXR4' because 'D' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'c' to 'RXR3' because 'C' collides with a NONMEM reserved name i renamed model variable 'd' to 'RXR4' because 'D' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'c' to 'RXR3' because 'C' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'c' to 'RXR3' because 'C' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'c' to 'RXR3' because 'C' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'c' to 'RXR3' because 'C' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name i renamed model variable 'b' to 'RXR2' because 'B' collides with a NONMEM reserved name i renamed model variable 'c' to 'RXR3' because 'C' collides with a NONMEM reserved name i renamed model variable 'a' to 'RXR1' because 'A' collides with a NONMEM reserved name > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done i writing nonmem files i done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done i mu2 item: Rx_pow_di(WT, 2) > significant model change detected > removed from model: '$muRefFinal', '$timeVaryingCovariates' > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done i writing nonmem files i done i only exported NONMEM control stream/data i mu2 item: Rx_pow_di(WT, 2) > significant model change detected > removed from model: '$muRefFinal', '$timeVaryingCovariates' > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done i only exported NONMEM control stream/data > loading into symengine environment... > pruning branches (`if`/`else`) of full model... v done i writing nonmem files i done i only exported NONMEM control stream/data i parameter labels from comments are typically ignored in non-interactive mode i Need to run with the source intact to parse comments i parameter labels from comments are typically ignored in non-interactive mode i Need to run with the source intact to parse comments i parameter labels from comments are typically ignored in non-interactive mode i Need to run with the source intact to parse comments i parameter labels from comments are typically ignored in non-interactive mode i Need to run with the source intact to parse comments i parameter labels from comments are typically ignored in non-interactive mode i Need to run with the source intact to parse comments i change initial estimate (2.4428094469073) and upper/lower bound (0.03 to 41.4747752017918) of `tka` > significant model change detected > removed from model: '$getSplitModel' i change initial estimate (4.49376186753199) and upper/lower bound (0.248347795670923 to 54.1489791547512) of `tcl` i change initial estimate (2.4428094469073) and upper/lower bound (0.03 to 41.4747752017918) of `tka` > significant model change detected > removed from model: '$getSplitModel' i change initial estimate (4.49376186753199) and upper/lower bound (0.248347795670923 to 54.1489791547512) of `tcl` i change initial estimate (2.246880933766) and upper/lower bound (0.124173897835461 to 27.0744895773756) of `tq` i change initial estimate (2.4428094469073) and upper/lower bound (0.03 to 41.4747752017918) of `tka` > significant model change detected > removed from model: '$getSplitModel' i change initial estimate (4.49376186753199) and upper/lower bound (0.248347795670923 to 54.1489791547512) of `tcl` i change initial estimate (2.4428094469073) and upper/lower bound (0.03 to 41.4747752017918) of `ka` > significant model change detected > removed from model: '$getSplitModel' [ FAIL 0 | WARN 1 | SKIP 46 | PASS 1195 ] ══ Skipped tests (46) ══════════════════════════════════════════════════════════ • .zip == "" is TRUE (1): 'test-nonmem-failure.R:124:3' • On CRAN (41): 'test-as-nlmixr2-pktime.R:33:3', 'test-as-nlmixr2-pktime.R:48:3', 'test-as-nlmixr2.R:8:3', 'test-as-nlmixr2.R:75:3', 'test-as-nlmixr2.R:141:3', 'test-bioavil-works.R:2:3', 'test-convert.R:2:3', 'test-convert.R:35:3', 'test-convert.R:215:3', 'test-convert.R:229:3', 'test-fmeMcmc.R:4:3', 'test-fmeMcmc.R:65:3', 'test-fmeMcmc.R:103:3', 'test-fmeMcmc.R:178:3', 'test-linCmt.R:111:3', 'test-linCmt.R:138:3', 'test-linCmt.R:156:3', 'test-linCmt.R:180:3', 'test-linCmt.R:280:3', 'test-monolix.R:783:3', 'test-monolix.R:938:3', 'test-monolix.R:1030:3', 'test-monolix2rx-ss.R:2:3', 'test-nlmer.R:2:3', 'test-nlmer.R:54:3', 'test-nlmer.R:142:3', 'test-nonmem-monolix-nlmixr2lib.R:6:3', 'test-nonmem-monolix-stress.R:5:3', 'test-nonmem-monolix-stress.R:23:3', 'test-nonmem-monolix-stress.R:83:3', 'test-nonmem-monolix-stress.R:102:3', 'test-nonmem.R:1448:3', 'test-poped.R:1122:3', 'test-psuedoOptim.R:3:3', 'test-psuedoOptim.R:70:3', 'test-saemix.R:3:3', 'test-saemix.R:83:3', 'test-saemix.R:151:3', 'test-saemix.R:241:3', 'test-saemix.R:316:3', 'test-saemix.R:349:3' • On Windows (3): 'test-nonmem-failure.R:236:5', 'test-nonmem-failure.R:472:5', 'test-nonmem-failure.R:580:5' • Requires >8 GB RAM: cmtDvid vector of 2^31 integers (8 GB) needed to trigger pre-fix segfault; n=6e8 used here fits in ~2.4 GB and verifies correct R_xlen_t behavior for sub-INT_MAX sizes (1): 'test-c-integer-safety.R:342:3' [ FAIL 0 | WARN 1 | SKIP 46 | PASS 1195 ] > > proc.time() user system elapsed 576.92 5.21 400.78