Hi,
I'm having problems with R crashing with the new beta version. It does not seem to be a problem of excess memory usage, as I've seen in another thread here. What is strange is that after I've downloaded the beta things look fine (see mxVersion below), and it works with a simple twin multivariate saturated script. When I try a more complicated model, this is when R crashes.
> mxVersion()
OpenMx version: 2.0.0.3751
R version: R version 3.1.1 (2014-07-10)
Platform: i386-w64-mingw32
Default optimiser: CSOLNP
Here is information from Windows event Viewer when R crashes:
Faulting application name: Rgui.exe, version: 3.11.579.0, time stamp: 0x53be708a
Faulting module name: OpenMx.dll, version: 0.0.0.0, time stamp: 0x53ee0f11
Exception code: 0xc0000005
Fault offset: 0x0001a2be
Faulting process id: 0x1820
Faulting application start time: 0x01cfc778c91b0525
Faulting application path: C:\Program Files\R\R-3.1.1\bin\i386\Rgui.exe
Faulting module path: C:\Program Files\R\R-3.1.1\library\OpenMx\libs\i386\OpenMx.dll
Report Id: 3be81308-336c-11e4-87e3-005056ad3f12
Does anyone have any idea what could be causing this? I've tried different computers and R Versions.
Does it crash when NPSOL is the default optimizer? You can switch from CSOLNP to NPSOL with
mxOption(NULL,"Default optimizer","NPSOL")
.Also, out of curiosity, what do you see when you enter
options()$mxOption$"Number of Threads"
into R?Edit:
Two other things. First, on which other systems have you observed this crash? Second, could you attach your script or one similar to it?
Thanks for the reply!
Yes, it also crashes with NPSOL.
This is what comes out when entering
options()$mxOption$"Number of Threads"
[1] 0
It also crashed on R 3.0.1, and I've only tried Windows. I should ask the author of the script for permission to post it, so I will come back to this.
try running this first to stop it trying to go multi-threaded?
Thanks, but this unfortunately did not work either.
Attached is a version of the script I've used.
What do
nv
,nth
, andVars
happen to be in your case?nv <- 3
nth <- 6
Vars <- c('M07nnT','F07nnT','T07nnT')
I think there's a bug with
mxFitFunctionMultigroup()
. Try redefining your function toand see if that prevents the crash.
Yes, this prevented the crash! Thank you so much for the help!
At present the fix is only available for those building from source. Beta 3 should include the fix when it is released. Sorry for the inconvenience.