It may be that I'm receiving a corrupted tarball.
I'm running Linux version 2.6.18-164.11.1.el5 (mockbuild@builder10.centos.org) (gcc version
4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Wed Jan 20 07:32:21 EST 2010
On a Quad-Core AMD Opteron(tm) Processor 2378
I get the following long list of warnings. OpenMx appears to install and load without errors, but then I get segmentation faults when calling the optimizer. The model to optimize is the first optimization example in the user guide.
-Scott
$ R
R version 2.10.1 (2009-12-14)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> source('https://openmx.ssri.psu.edu/getOpenMx.R')
Warning in install.packages(pkgs = c("OpenMx"), repos = repos) :
argument 'lib' is missing: using '/home/vrie0006/R/x86_64-unknown-linux-gnu-library/2.10'
trying URL 'https://openmx.ssri.psu.edu/packages/src/contrib/OpenMx_0.4.1-1320.tar.gz'
Content type 'application/x-gzip' length 4445964 bytes (4.2 Mb)
opened URL
downloaded 4.2 Mb
- installing source package 'OpenMx' ...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc is installed... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking if gcc accepts -dumpversion option... yes
checking gcc version... 4.1.2
checking for gawk... gawk
checking for inst/npsol/linux/x86_64/gcc4.1/libnpsol.a... yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: executing src/omxSymbolTable.h commands
config.status: executing src/omxSymbolTable.c commands
** libs
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c merge.c -o merge.o
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c npsolWrap.c -o npsolWrap.o
In file included from npsolWrap.c:23:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxState.h:64,
from npsolWrap.c:28:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxState.h:64,
from npsolWrap.c:28:
omxSymbolTable.h:65:7: warning: no newline at end of file
In file included from omxState.h:64,
from npsolWrap.c:28:
omxMatrix.h:155:27: warning: no newline at end of file
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c omxAlgebra.c -o omxAlgebra.o
In file included from omxMatrix.h:39,
from omxAlgebra.c:30:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxAlgebra.c:30:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxAlgebra.c:30:
omxSymbolTable.h:65:7: warning: no newline at end of file
In file included from omxAlgebra.c:30:
omxMatrix.h:155:27: warning: no newline at end of file
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c omxAlgebraFunctions.c -o omxAlgebraFunctions.o
In file included from omxMatrix.h:39,
from omxAlgebraFunctions.h:27,
from omxAlgebraFunctions.c:30:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxAlgebraFunctions.h:27,
from omxAlgebraFunctions.c:30:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxAlgebraFunctions.h:27,
from omxAlgebraFunctions.c:30:
omxSymbolTable.h:65:7: warning: no newline at end of file
In file included from omxAlgebraFunctions.h:27,
from omxAlgebraFunctions.c:30:
omxMatrix.h:155:27: warning: no newline at end of file
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c omxAlgebraObjective.c -o omxAlgebraObjective.o
In file included from omxMatrix.h:39,
from omxAlgebraFunctions.h:27,
from omxAlgebraObjective.c:17:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxAlgebraFunctions.h:27,
from omxAlgebraObjective.c:17:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxAlgebraFunctions.h:27,
from omxAlgebraObjective.c:17:
omxSymbolTable.h:65:7: warning: no newline at end of file
In file included from omxAlgebraFunctions.h:27,
from omxAlgebraObjective.c:17:
omxMatrix.h:155:27: warning: no newline at end of file
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c omxData.c -o omxData.o
In file included from omxData.h:39,
from omxData.c:27:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxObjective.h:43,
from omxMatrix.h:44,
from omxSymbolTable.h:10,
from omxAlgebra.h:42,
from omxData.h:43,
from omxData.c:27:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxAlgebra.h:42,
from omxData.h:43,
from omxData.c:27:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxData.h:43,
from omxData.c:27:
omxSymbolTable.h:65:7: warning: no newline at end of file
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c omxFIMLObjective.c -o omxFIMLObjective.o
In file included from omxFIMLObjective.c:23:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxAlgebraFunctions.h:27,
from omxFIMLObjective.c:24:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxAlgebraFunctions.h:27,
from omxFIMLObjective.c:24:
omxSymbolTable.h:65:7: warning: no newline at end of file
In file included from omxAlgebraFunctions.h:27,
from omxFIMLObjective.c:24:
omxMatrix.h:155:27: warning: no newline at end of file
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c omxMLObjective.c -o omxMLObjective.o
In file included from omxMatrix.h:39,
from omxAlgebraFunctions.h:27,
from omxMLObjective.c:23:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxAlgebraFunctions.h:27,
from omxMLObjective.c:23:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxAlgebraFunctions.h:27,
from omxMLObjective.c:23:
omxSymbolTable.h:65:7: warning: no newline at end of file
In file included from omxAlgebraFunctions.h:27,
from omxMLObjective.c:23:
omxMatrix.h:155:27: warning: no newline at end of file
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c omxMatrix.c -o omxMatrix.o
In file included from omxMatrix.h:39,
from omxMatrix.c:28:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxMatrix.c:28:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxMatrix.c:28:
omxSymbolTable.h:65:7: warning: no newline at end of file
In file included from omxMatrix.c:28:
omxMatrix.h:155:27: warning: no newline at end of file
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c omxObjective.c -o omxObjective.o
In file included from omxObjective.h:38,
from omxObjective.c:31:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxObjective.h:43,
from omxObjective.c:31:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxObjective.h:43,
from omxObjective.c:31:
omxSymbolTable.h:65:7: warning: no newline at end of file
In file included from omxObjective.h:43,
from omxObjective.c:31:
omxMatrix.h:155:27: warning: no newline at end of file
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c omxObjectiveTable.c -o omxObjectiveTable.o
In file included from omxMatrix.h:39,
from omxSymbolTable.h:10,
from omxObjectiveTable.c:23:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxSymbolTable.h:10,
from omxObjectiveTable.c:23:
omxSymbolTable.h:65:7: warning: no newline at end of file
In file included from omxState.h:64,
from omxAlgebra.h:43,
from omxMatrix.h:43,
from omxSymbolTable.h:10,
from omxObjectiveTable.c:23:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxObjectiveTable.c:23:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxObjectiveTable.c:23:
omxSymbolTable.h:65:7: warning: no newline at end of file
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c omxRAMObjective.c -o omxRAMObjective.o
In file included from omxObjective.h:38,
from omxRAMObjective.c:17:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxObjective.h:43,
from omxRAMObjective.c:17:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxObjective.h:43,
from omxRAMObjective.c:17:
omxSymbolTable.h:65:7: warning: no newline at end of file
In file included from omxObjective.h:43,
from omxRAMObjective.c:17:
omxMatrix.h:155:27: warning: no newline at end of file
omxRAMObjective.c: In function 'omxCallRAMObjective':
omxRAMObjective.c:78: warning: unused variable 'Ax'
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c omxRObjective.c -o omxRObjective.o
In file included from omxMatrix.h:39,
from omxAlgebraFunctions.h:27,
from omxRObjective.c:23:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxAlgebraFunctions.h:27,
from omxRObjective.c:23:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxAlgebraFunctions.h:27,
from omxRObjective.c:23:
omxSymbolTable.h:65:7: warning: no newline at end of file
In file included from omxAlgebraFunctions.h:27,
from omxRObjective.c:23:
omxMatrix.h:155:27: warning: no newline at end of file
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c omxRowObjective.c -o omxRowObjective.o
In file included from omxRowObjective.c:23:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxAlgebraFunctions.h:27,
from omxRowObjective.c:24:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxAlgebraFunctions.h:27,
from omxRowObjective.c:24:
omxSymbolTable.h:65:7: warning: no newline at end of file
In file included from omxAlgebraFunctions.h:27,
from omxRowObjective.c:24:
omxMatrix.h:155:27: warning: no newline at end of file
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c omxState.c -o omxState.o
In file included from omxState.h:53,
from omxState.c:27:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxState.h:64,
from omxState.c:27:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxState.h:64,
from omxState.c:27:
omxSymbolTable.h:65:7: warning: no newline at end of file
In file included from omxState.h:64,
from omxState.c:27:
omxMatrix.h:155:27: warning: no newline at end of file
gcc -std=gnu99 -I/share/apps/R-2.10.1/lib64/R/include -I/usr/local/include -Wall -fpic -g -O2 -c omxSymbolTable.c -o omxSymbolTable.o
In file included from omxMatrix.h:39,
from omxSymbolTable.h:10,
from omxSymbolTable.c:7:
omxDefines.h:73:28: warning: no newline at end of file
In file included from omxAlgebra.h:42,
from omxMatrix.h:43,
from omxSymbolTable.h:10,
from omxSymbolTable.c:7:
omxSymbolTable.h:65:7: warning: no newline at end of file
In file included from omxState.h:64,
from omxAlgebra.h:43,
from omxMatrix.h:43,
from omxSymbolTable.h:10,
from omxSymbolTable.c:7:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxSymbolTable.h:10,
from omxSymbolTable.c:7:
omxMatrix.h:155:27: warning: no newline at end of file
In file included from omxSymbolTable.c:7:
omxSymbolTable.h:65:7: warning: no newline at end of file
omxSymbolTable.c:54:3: warning: no newline at end of file
gfortran -fpic -g -O -c sadmvn.f -o sadmvn.o
gcc -std=gnu99 -shared -L/usr/local/lib64 -o OpenMx.so merge.o npsolWrap.o omxAlgebra.o omxAlgebraFunctions.o omxAlgebraObjective.o omxData.o omxFIMLObjective.o omxMLObjective.o omxMatrix.o omxObjective.o omxObjectiveTable.o omxRAMObjective.o omxRObjective.o omxRowObjective.o omxState.o omxSymbolTable.o sadmvn.o -lgfortran -lm -L/share/apps/R-2.10.1/lib64/R/lib -lRblas -L/share/apps/R-2.10.1/lib64/R/lib -lRlapack -lnpsol -L../inst/npsol/linux/x86_64/gcc4.1 -lgfortran -lm
** R
** data
** moving datasets to lazyload DB
** demo
** inst
** preparing package for lazy loading
Creating a new generic function for "print" in "OpenMx"
Creating a new generic function for "nrow" in "OpenMx"
Creating a new generic function for "ncol" in "OpenMx"
Creating a new generic function for "summary" in "OpenMx"
** help
*** installing help indices
** building package indices ... - DONE (OpenMx)
The downloaded packages are in
'/tmp/RtmpWaPihM/downloaded_packages'
> q()
Save workspace image? [y/n/c]: n
$ R --vanilla < test.r > test.r.out
Loading required package: OpenMx
Loading required package: MASS
*** caught segfault ***
address 0x81fe262f8, cause 'memory not mapped'
Traceback:
1: .Call("callNPSOL", objective, startVals, constraints, matrices, parameters, algebras, data, intervalList, communication, options, state, PACKAGE = "OpenMx")
2: runHelper(model, frontendStart, intervals, silent, suppressWarnings, unsafe, checkpoint, useSocket)
3: mxRun(bivCorModel)
aborting ...
Segmentation fault
$
It's possible that npsol was compiled without -fPIC for gcc 4.2 on x86_64. We've seen that problem occur on OS X. We have npsol static libraries from gcc 3.4, 3.9, 4.1, 4.3, and 4.4. I don't know how easy it is to install an alternate gcc version on Cent OS.
I have confirmed that this problem occurs on another CentOS system I was asked to check recently, albeit with a gcc 4.1.2 so perhaps it's not gcc's fault?
[12]neale@merlot/home/neale % gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)
> summary(run<-mxRun(onelocus,intervals=T))
Running onelocus
*** caught segfault ***
address 0x81a6f4a98, cause 'memory not mapped'
Traceback:
1: .Call("callNPSOL", objective, startVals, constraints, matrices, parameters, algebras, data, intervalList, communication, options, state, PACKAGE = "OpenMx")
2: runHelper(model, frontendStart, intervals, silent, suppressWarnings, unsafe, checkpoint, useSocket)
3: mxRun(onelocus, intervals = T)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:
Selection: 1
aborting ...
Segmentation fault
You could try setting the environment variable to force OpenMx to compile a 32-bit version. That will probably work. Try
export MAKEFLAGS = "CFLAGS=-march=i386 FFLAGS=-march=i386"
(from Helen Wang)
tried it, it won't take the i386 structure, can't pass the compilation from the makefile generated by configure. guess unless R is also i386 version, and the system libraries have to match the structure as well...
see error message below
++++++++++++++++++++++++++++++++++++++++++++++
[root@merlot optlibarary]# setenv MAKEFLAGS "CFLAGS=-march=i386 FFLAGS=-march=i386"
[root@merlot optlibarary]# echo $MAKEFLAGS
CFLAGS=-march=i386 FFLAGS=-march=i386
[root@merlot optlibarary]# R
R version 2.11.1 (2010-05-31)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> source('http://openmx.psyc.virginia.edu/getOpenMx.R')
trying URL 'http://openmx.psyc.virginia.edu/packages/src/contrib/OpenMx_0.4.1-1320.tar.gz'
Content type 'application/x-gzip' length 4445964 bytes (4.2 Mb)
opened URL
downloaded 4.2 Mb
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc is installed... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking if gcc accepts -dumpversion option... yes
checking gcc version... 4.1.2
checking for gawk... gawk
checking for inst/npsol/linux/x86_64/gcc4.1/libnpsol.a... yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: executing src/omxSymbolTable.h commands
config.status: executing src/omxSymbolTable.c commands
** libs
gcc -std=gnu99 -I/usr/local/lib64/R/include -I/usr/local/include -Wall -fpic -march=i386 -c merge.c -o merge.o
merge.c:1: error: CPU you selected does not support x86-64 instruction set
merge.c:1: error: CPU you selected does not support x86-64 instruction set
make: *** [merge.o] Error 1
ERROR: compilation failed for package âOpenMxâ
The downloaded packages are in
â/home/huan/tmp/RtmpnDZNIs/downloaded_packagesâ
Updating HTML index of packages in '.Library'
Warning message:
In install.packages(pkgs = c("OpenMx"), repos = repos) :
installation of package 'OpenMx' had non-zero exit status
>
It's trying to compile the 32-bit binary but that failed:
merge.c:1: error: CPU you selected does not support x86-64 instruction set
merge.c:1: error: CPU you selected does not support x86-64 instruction set
You could try loading R with R --arch=i386. I have no idea if that works. The real solution is to get NPSOL recompiled on that platform with -fPIC.
Any chance someone is working on this? I have the same problem. Unfortunately, I can't step back to arch=i386, so right now I can't use a massive computer resource with OpenMx projects.
The usual port of call for this kind of issue is out on vacation. When he returns, I hope we can resume action on it for I too am without heavy CPU support due to no gcc 3.2.3 support which both of our clusters use.
I went back and looked at my old emails, and we have somewhere a copy of libnpsol for x86-64 on gcc 4.1. But that copy didn't make it into the svn repository. When he gets back from vacation, it should be a quick turnaround to add the file into the repository. I'll make a binary release when we get it.
I've uploaded the new version of libnpsol into the repository. Is there a person who is comfortable at the command line who could try out the following?
I installed version 0.5.0 today. It seems to have worked with my initial test (a test that previously failed). I'll be testing further today. If you don't hear from me within 24 hours, then I am off happily simulating.
Thanks so much for getting this thing to work. I now have access to hundreds of cores!