Crash INLA message

1,291 views
Skip to first unread message

Bowen He

unread,
May 19, 2022, 12:06:39 PM5/19/22
to R-inla discussion group

Hi, my inla() function gives the following messages:


Error in .T.2.C(x) %*% .T.2.C(y) : 

  Cholmod error 'problem too large' at file ../Core/cholmod_sparse.c, line 89

Error in inla.core.safe(formula = formula, family = family, contrasts = contrasts,  : 

  *** Fail to get good enough initial values. Maybe it is due to something else.

Calls: inla -> inla.core.safe

ANy help?


Thanks,

B

INLA help

unread,
May 19, 2022, 12:18:15 PM5/19/22
to Bowen He, R-inla discussion group

I think the msg says it all.  You might have entered a matrix of dense format where a sparse matrix was expected?   I would check the input to the model and the format of the matrices. This is in the preparations in R before the inla-program is run.

 

Best

H

--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/r-inla-discussion-group/866ed783-5fee-4337-9abf-391adcfb98d8n%40googlegroups.com.

Bowen He

unread,
May 19, 2022, 8:43:25 PM5/19/22
to R-inla discussion group
Another question is that my verbose = TRUE generates the following messages and then freeze for days with no further actions

"Optimise using DEFAULT METHOD"
"Smart optimize part I: estimate gradient using forward differences"

And this could freeze for days without proceeding with no further messages being shown in the console.

Any ideas on how to fix the problem?


Thanks,
BH

INLA help

unread,
May 19, 2022, 9:06:46 PM5/19/22
to Bowen He, R-inla discussion group
That is weird.  Never seen this before.  Can you share so I can rerun?

Sent: Friday, May 20, 2022 3:43:25 AM

To: R-inla discussion group <r-inla-disc...@googlegroups.com>
Subject: Re: [r-inla] Crash INLA message
 

Bowen He

unread,
May 22, 2022, 12:15:39 AM5/22/22
to R-inla discussion group
Hi,

I found that the mesh resolution of the spde plays a lot of part in this. When the resolution is too small, the smart optimize part I never finishes and freezes for days and when the mesh is coarser, the program goes on without a problem.

Another question is: is there any way in INLA() to constrain the estimation of the model parameters so that the mean of the linear predictor of the predictions coordinates can only be positive? Thanks!

Thanks


Jhon Jairo Peña

unread,
Aug 2, 2022, 12:20:13 AM8/2/22
to R-inla discussion group
Hello

Excuse my english.

You were able to solve the problem of small areas, I find myself making a model of blocks in a city and I can't find a way to overcome the error that I get.


" Error in inla.core.safe(formula = formula, family = family, contrasts = contrasts, :
*** Fail to get good enough initial values. Maybe it is due to something else."

Maybe you could help me?

Alokesh Manna

unread,
Apr 12, 2023, 5:16:34 PM4/12/23
to R-inla discussion group
Hi 
I am very new to inla. Can anybody help me with this following error?

```
Assertion failed: (0 == 1), function GMRFLib_idxval_nsort_x_core, file idxval.c, line 856.
Error in inla.inlaprogram.has.crashed() :
  The inla-program exited with an error. Unless you interupted it yourself, please rerun with verbose=TRUE and check the output carefully.
  If this does not help, please contact the developers at <he...@r-inla.org>.

Error in inla.core.safe(formula = formula, family = family, contrasts = contrasts,  :
  *** Fail to get good enough initial values. Maybe it is due to something else.
```

Helpdesk (Haavard Rue)

unread,
Apr 13, 2023, 1:54:37 PM4/13/23
to Alokesh Manna, R-inla discussion group

I would guess you input covariates that are rather large in values, so
scaling/center them in some way should make this go away.

> n=10^4; r=inla(y~1 + x, data=data.frame(y=rnorm(n), x=rnorm(n)))
> r=inla(y~1 + x, data=data.frame(y=rnorm(n), x=10000000 + rnorm(n)),
safe=FALSE)
inla.mkl: idxval.c:846: GMRFLib_idxval_nsort_x_core: Assertion `0 == 1'
failed.
Error in inla.inlaprogram.has.crashed() :
The inla-program exited with an error. Unless you interupted it
yourself, please rerun with verbose=TRUE and check the output carefully.
If this does not help, please contact the developers at
<he...@r-inla.org>.
>



On Wed, 2023-04-12 at 14:14 -0700, Alokesh Manna wrote:
> Hi 
> I am very new to inla. Can anybody help me with this following error?
>
> ```
> Assertion failed: (0 == 1), function GMRFLib_idxval_nsort_x_core, file
> idxval.c, line 856.
> Error in inla.inlaprogram.has.crashed() :
>   The inla-program exited with an error. Unless you interupted it
> yourself, please rerun with verbose=TRUE and check the output
> carefully.
>   If this does not help, please contact the developers at
> <he...@r-inla.org>.
> Error in inla.core.safe(formula = formula, family = family, contrasts
> = contrasts,  :
>   *** Fail to get good enough initial values. Maybe it is due to
> something else.
> ```
> On Thursday, May 19, 2022 at 9:06:46 PM UTC-4 INLA help wrote:
> > That is weird.  Never seen this before.  Can you share so I can
> > rerun?
> >
> > Get Outlook for iOS
Håvard Rue
he...@r-inla.org

Alokesh Manna

unread,
Apr 13, 2023, 2:11:09 PM4/13/23
to Helpdesk, R-inla discussion group
Hi,
I have one important observation. My number of samples are in million(7 digits). If I just take a subsample(500000) then it runs without an error. But when I use the whole sample it gives that error. Do you think it is related to a memory problem?

INLA help

unread,
Apr 13, 2023, 3:00:01 PM4/13/23
to Alokesh Manna, R-inla discussion group
No.  It’s covariants that are not properly scaled 

Haavard Rue

Alokesh Manna

unread,
Apr 13, 2023, 3:07:00 PM4/13/23
to INLA help, R-inla discussion group
Ok, thank you. But if that is the case, then why the code when I use less number of observations? I am applying a multiple poisson regression with 3 covariates which are discrete in nature and one offset. How should one scale?

INLA help

unread,
Apr 13, 2023, 3:15:16 PM4/13/23
to Alokesh Manna, R-inla discussion group
x <- scale(x)

Larger sum, larger errors. 

Haavard Rue
Reply all
Reply to author
Forward
0 new messages