Problems installing 0.2.5 on R 2.10.1

2 replies [Last post]
mikewilde's picture
Offline
Joined: 12/06/2009

I just tried installing 0.2.5 on two different x86_64 systems, both running R 2.10.1.
On one, running Red Hat EL 5, I get a memory mapping failure and a segfault, I think from NPSOL. On the other, running Ubuntu 8, the install completes but OpenMx doesnt show up in installed.packages(), and the first tutorial example fails.

Are people running these combinations successfully?

Below is some of my output; I've attached the install logs and other info. The 3 files without system names are from the RHEL5 system;
OpenMax.ubuntu8.install.txt is from the Ubuntu system.

- Mike

==== On the RH EL5 system, I get:

> require(OpenMx)
Loading required package: OpenMx
>
> require(OpenMx)
>
> data(demoOneFactor)
>
> factorModel <- mxModel(name = "One Factor",
+ mxMatrix(type="Full", nrow=5, ncol=1, free=T, values=0.2, name="A"),
+ mxMatrix(type="Symm", nrow=1, ncol=1, free=T, values=1, name="L"),
+ mxMatrix(type="Diag", nrow=5, ncol=5, free=T, values=1, name="U"),
+ mxAlgebra(expression=A %*% L %*% t(A) + U, name="R"),
+ mxMLObjective(covariance="R", dimnames = names(demoOneFactor)),
+ mxData(observed=cov(demoOneFactor), type="cov", numObs=500))
>
> factorModelFit <- mxRun(factorModel)
Running One Factor

*** caught segfault ***
address 0x81280aa48, cause 'memory not mapped'

Traceback:
1: .Call("callNPSOL", objective, startVals, constraints, matrices, parameters, algebras, data, options, state, PACKAGE = "OpenMx")
2: mxRun(factorModel)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace

==== On the Ubuntu 8 system, I get:

> require(OpenMx)
Loading required package: OpenMx
>
> data(demoOneFactor)
> manifests <- names(demoOneFactor)
> latents <- c("G")
>
> factorModel <- mxModel("One Factor",
+ type="RAM",
+ manifestVars = manifests,
+ latentVars = latents,
+ mxPath(from=latents, to=manifests),
+ mxPath(from=manifests, arrows=2),
+ mxPath(from=latents, arrows=2, free=F, values=1.0),
+ mxData(observed=cov(demoOneFactor), type="cov", numObs=500))
>
> summary(mxRun(factorModel))
Running One Factor
Error in mxVersion() : subscript out of bounds
Error in summary(mxRun(factorModel)) :
error in evaluating the argument 'object' in selecting a method for function 'summary'
> traceback()
1: summary(mxRun(factorModel))
> mxVersion()
Error in mxVersion() : subscript out of bounds
> require(OpenMx)
> mxVersion()
Error in mxVersion() : subscript out of bounds
>

AttachmentSize
OpenMx.sysinfo.txt974 bytes
OpenMx.segfault.txt1.25 KB
OpenMx.install.txt11.45 KB
OpenMax.ubuntu8.install.txt22.72 KB
mspiegel's picture
Offline
Joined: 07/31/2009
Hooray for segfaults! I can

Hooray for segfaults! I can think of two options: (a) try installing the 0.2.6 binary release. Although if that makes the problem go away it's a 50/50 change that it's dumb luck and the bug is still there. (b) Build OpenMx from source and then use gdb to pinpoint the error:

$ R -d gdb --vanilla

See http://cran.r-project.org/doc/manuals/R-exts.html#Debugging-compiled-code. You could try running it under valgrind as well, but I would start with gdb.

mikewilde's picture
Offline
Joined: 12/06/2009
gdb showed the segfault to be

gdb showed the segfault to be occurring immediately on entry to npsol. I rebuilt libnpsol on this machine, and that seems to have fixed the problem. (at least the first OpenMx tutorial example now works).

I'll discuss with Michael Spiegel whats going wrong in the build process and whether we need to update the gcc4.1/libnpsol.a in the OpenMx distro, or not.

Regarding the Ubuntu install failure: OpenMx 0.2.6 seems to now work there. Not sure what was going wrong with 0.2.5; possible pilot error on my part, as I'm installed into a user-built R 2.10.1.

- Mike