Error with 2.6.9 vs 2.5.2

Posted on
No user picture. britt01 Joined: 08/04/2015

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)

Thanks in advance for all of your help!

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

Replied on Fri, 08/26/2016 - 15:12
Picture of user. AdminRobK Joined: 01/24/2014

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 ***
address 0x7ff3077ce138, cause 'invalid permissions'
An irrecoverable exception occurred. R is aborting now ...
Segmentation fault

Replied on Fri, 08/26/2016 - 15:44
Picture of user. AdminRobK Joined: 01/24/2014

In reply to by britt01

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.

Replied on Fri, 08/26/2016 - 16:05
No user picture. britt01 Joined: 08/04/2015

In reply to by AdminRobK

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’

The downloaded source packages are in
‘/tmp/Rtmp5wFFFw/downloaded_packages’
Warning message:
In install.packages(pkgs = c("OpenMx"), contriburl = contrib.url(repos, :
installation of package ‘OpenMx’ had non-zero exit status

Replied on Tue, 08/30/2016 - 16:34
Picture of user. AdminRobK Joined: 01/24/2014

In reply to by britt01

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.