# Error with 2.6.9 vs 2.5.2

13 posts / 0 new
Offline
Joined: 08/04/2015 - 20:32
Error with 2.6.9 vs 2.5.2
AttachmentSize
7.18 KB

Hello,

I am running an ACE analyses on ordinal variables and I am finding that my script is failing with an error about stack imbalance when I use OpenMx 2.6.9 but not when I use OpenMx 2.5.2 Below is the Error I received, and I have attached a script that recreates the error when using 2.6.9 and finishes without error when using 2.5.2 adapted from Hermine Maes example script (http://ibg.colorado.edu/cdrom2016/maes/UnivariateAnalysis/onea/oneACEoa.R)

Britt

Error
Calls: mxTryHardOrdinal -> mxTryHard
Error in runHelper(model, frontendStart, intervals, silent, suppressWarnings, :
Confidence intervals are not supported for units 0
Error: C stack usage 845910713468 is too close to the limit
Execution halted
Warning: stack imbalance in 'lazyLoadDBfetch', 76 then 71
Warning: stack imbalance in '<-', 30 then 29
Errors during final fit for Hessian/SEs/CIs

Warning: stack imbalance in '{', 27 then 26
Warning: stack imbalance in 'if', 25 then 24

Offline
Joined: 01/24/2014 - 12:15
Platform and R version?

Hi, Brittany. What operating system and version of R are you using?

I ask because I am unable to reproduce the error you report on one of my systems, which is 32-bit Windows (on Intel x86) with R version 3.1.1 (and running OpenMx v2.6.9, of course). However, your script causes a segfault(!) and crashes R under x86_64 Linux/GNU with R version 3.3.1.

Edit: Here's the text of the error message I get, under Linux:

Error in runHelper(model, frontendStart, intervals, silent, suppressWarnings, :
Confidence intervals are not supported for units 0
Calls: mxTryHardOrdinal -> mxTryHard
Warning: stack imbalance in 'options', 47 then 48
Execution halted
Error in UseMethod("conditionCall") :
'UseMethod' used in an inappropriate fashion

*** caught segfault ***
An irrecoverable exception occurred. R is aborting now ...
Segmentation fault

Offline
Joined: 08/04/2015 - 20:32
Below is the operating system

Below is the operating system and R version that I am using.

R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 15.10

Offline
Joined: 01/24/2014 - 12:15
OK, I'll look into it.

OK, I'll look into it. In the meantime, would you mind trying your script again in OpenMx v2.6.9, but using NPSOL instead of SLSQP? Use mxOption(NULL,"Default optimizer","NPSOL") to switch. I'm curious to know if you still get similar errors, and if the results (parameter estimates, etc.) look reasonable.

Offline
Joined: 08/04/2015 - 20:32
Thanks so much!! I tried

Thanks so much!! I tried running the script again with the NPSOL optimizer, however I got the following error:

Warning message:
In mxTryHard(model = model, greenOK = greenOK, checkHess = checkHess,  :
Error in runHelper(model, frontendStart, intervals, silent, suppressWarnings,  :
NPSOL is not available in this build. See ?omxGetNPSOL() to download this optimizer

Error: The name 'Error in runHelper(model, frontendStart, intervals, silent, suppressWarnings,  :
NPSOL is not available in this build. See ?omxGetNPSOL() to download this optimizer
' is illegal because it contains the '.' character in mxModel(fitACE, name = "oneAEoa")
Execution halted


I then tried getting the optimizer with the function and received a fatal error. So I am not sure how to proceed to test the NPSOL optimizer. Thanks!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
omxMLFitFunction.cpp:19:33: fatal error: stan/math/mix/mat.hpp: No such file or directory
compilation terminated.
/usr/lib/R/etc/Makeconf:143: recipe for target 'omxMLFitFunction.o' failed
make: *** [omxMLFitFunction.o] Error 1
ERROR: compilation failed for package ‘OpenMx’
* removing ‘/export/home/brittany/R/x86_64-pc-linux-gnu-library/3.2/OpenMx’
* restoring previous ‘/export/home/brittany/R/x86_64-pc-linux-gnu-library/3.2/OpenMx’

Warning message:
In install.packages(pkgs = c("OpenMx"), contriburl = contrib.url(repos, :
installation of package ‘OpenMx’ had non-zero exit status

Offline
Joined: 08/04/2015 - 20:32
Oops forgot to specify that

Oops forgot to specify that when I tried to get the NPSOL optimizer I used the omxGetNPSOL() function. Thanks!

Offline
Joined: 01/24/2014 - 12:15
getOpenMx.R

You can install NPSOL-enabled OpenMx by following the instructions in our Download page. Basically, copy-paste

source('http://openmx.psyc.virginia.edu/getOpenMx.R')

Offline
Joined: 08/04/2015 - 20:32
Thanks! And to clarify will

Thanks! And to clarify will this over write the OpenMx version 2.5.2 I have installed?

Offline
Joined: 01/24/2014 - 12:15
Most likely, yes, it will.

Most likely, yes, it will.

Offline
Joined: 08/04/2015 - 20:32
Looks like that new OpenMx

Looks like that new OpenMx with the NPSOL fixed it, thanks!! :)

Offline
Joined: 01/24/2014 - 12:15
good to hear, but don't trust the SEs

That's good to hear!

I'd like to thank you for reporting the error you encountered, and especially, for including a script that reproduces it. While looking into the matter, I noticed that mxTryHard() calculates and reports standard errors when there are MxConstraints involved. It's not supposed to, though. So, I fixed that behavior in the source repository, and it will be fixed in the next binary release. Making that change to the source also appears to repair the issue you encountered with SLSQP. In the meantime, don't trust the standard errors you're getting if you have any MxConstraints in your MxModel; go by the confidence intervals instead.

Offline
Joined: 08/04/2015 - 20:32
Thanks for the heads up on

Thanks for the heads up on the MxContraints! :)

Offline
Joined: 08/04/2015 - 20:32
Looks like that new OpenMx

Looks like that new OpenMx with the NPSOL fixed it, thanks!! :)