nlmixr2 / nlmixr2est

nlmixr2 estimation routines
https://nlmixr2.github.io/nlmixr2est/
GNU General Public License v2.0
7 stars 3 forks source link

Crash when calculating covariance #482

Closed mattfidler closed 1 month ago

mattfidler commented 1 month ago
Thread 1 "R" received signal SIGSEGV, Segmentation fault.
0x00007fffec926b2f in foceiCalcCov (e=...) at inner.cpp:5265
5265    inner.cpp: No such file or directory.
(gdb) bt
#0  0x00007fffec926b2f in foceiCalcCov (e=...) at inner.cpp:5265
#1  0x00007fffec92d5b8 in foceiFitCpp_ (e=...) at inner.cpp:6719
mattfidler commented 1 month ago

Crashing reprex

library(nlmixr2est)
one.compartment <- function() {
  ini({
    tka <- fix(0.45) # Log Ka
    tcl <- 1 # Log Cl
    tv <- fix(3.45)    # Log V
    eta.ka ~ fix(0.6)
    eta.cl ~ fix(0.3)
    eta.v ~ fix(0.1)
    add.sd <- fix(0.7)
  })
  model({
    ka <- exp(tka + eta.ka)
    cl <- exp(tcl + eta.cl)
    v <- exp(tv + eta.v)
    d/dt(depot) = -ka * depot
    d/dt(center) = ka * depot - cl / v * center
    cp = center / v
    cp ~ add(add.sd)
  })
}
fit2 <- nlmixr(one.compartment, theo_sd,  est="focei", control=list(print=0))