Skip to contents

There are number of issues that can crop up when running/fitting the model either using INLA or inlabru. Below we have compiled issues that we find common but we also recommend asking questions on the google groups forum.

Has the model actually crashed?

Does the model stop running and give error like inla.inlaprogram.has.crash(): the inla-program exited with an error. …..? Or does it give other messages but has not actually crashed?

INLA models can take some time to produce solutions and often times will give messages like “failed to factorize Q”. However this does not mean the model has completely failed, only that in that iteration it did not complete it’s task. Allow the model to run as long as it needs or returns a crash message.

Are you running the model in verbose mode?

The model can be run in verbose mode so that it outputs feedback. This feedback can be useful for diagnosing issues. Running in verbose mode is done like so:

fit.mod <- inlabru::bru(formula,
  data = XX,
  family = XX,
  options = list(
    verbose = TRUE
  )
)

Memory issues

  • How large is your data set?
  • How many mesh nodes? Is the mesh well designed (e.g., no isolated triangles)?
  • Have you tried reducing the number of mesh nodes and testing which mesh size avoids errors?

inla.mode="classic" or inla.mode="experimental"

inlabru has two modes “classic” and “experimental”. It is often the case that if you switch the mode then the model will not crash and you will get a result. To do so, add the parameter either inla.mode="classic" or inla.mode="experimental" to the INLAbru call function. So, it’s something like:

fit.mod <- inlabru::bru(formula,
  data = XX,
  family = XX,
  options = list(
    inla.mode = "classic", # or “inla.mode="experimental"
    verbose = TRUE
  )
)

How many threads are you using?

By default, inlabru will use however many threads are available. However this can cause issues. You can limit the number of threads with num.threads, by setting num.threads="1:1":

fit.mod <- inlabru::bru(formula,
  data = XX,
  family = XX,
  options = list(
    num.threads = "1:1",
    verbose = TRUE
  )
)

Have you selected reasonable control parameters?

INLA has a number options that can be accessed in the fitting formula using the options parameter. The list of options is rather large and we encourage you to explore and experiment with them. Typically this looks something like:

fit.mod <- inlabru::bru(formula,
  data = XX, family = XX,
  options = list(
    control.inla = list(
      reordering = "metis",
      int.strategy = "eb"
    ),
    verbose = TRUE
  )
)

INLA error - Linux - Failed to get good enough initial values

If you’re running Linux and encounter an error similar to the one below:

.../INLA/INLA/bin/linux/64bit/inla.mkl: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by .../INLA/INLA/bin/linux/64bit/libmvec.so.1)

 *** inla.core.safe:  inla.program has crashed: rerun to get better initial values. try=1/1 
Loading required package: INLA
Warning: package 'INLA' was built under R version 4.3.1
Loading required package: Matrix
Loading required package: sp
This is INLA_23.10.19-1 built 2023-10-19 08:26:30 UTC.
 - See www.r-inla.org/contact-us for how to get help.
 - List available models/likelihoods/etc with inla.list.models()
 - Use inla.doc(<NAME>) to access documentation
Warning in iinla(model = info[["model"]], lhoods = info[["lhoods"]], options = info[["options"]]) :
  iinla: Problem in inla: Error in inla.core.safe(formula = formula, family = family, contrasts = contrasts,  : 
  *** Failed to get good enough initial values. Maybe it is due to something else.

You may need to run a binary install of INLA. This can be done by running the following:

For more installation instructions see the INLA documentation.