OpenMx installation in Linux CentOS 6.8
Posted on

Forums
I am not able to compile openmx under 3.3.0. I was advised to change the compiler by including
CXX=g++ in the ~/.R/Makevars file.
But the openMx is still being compiled using icpc instead of g++ and I was asked by the help desk to contact the developers.
Any help?
Thanks
Anbu.
CXX
You're on the right track. Try CXX1X
Log in or register to post comments
In reply to CXX by jpritikin
Tried CXX1X but still the
Tried CXX1X but still the compilation didn't go through:
NOTE: ./configure is not an autoconf generated script.
Change default C/C++ compiler and default compile flags by editing ~/.R/Makevars
** libs
g++ -std=c++11 -I/apps/R/3.3.0/lib64/R/include -DNDEBUG -I/usr/local/include -I"/home/561/aat561/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/home/561/aat561/R/x86_64-pc-linux-gnu-library/3.3/RcppEigen/include" -I"/home/561/aat561/R/x86_64-pc-linux-gnu-library/3.3/StanHeaders/include" -I"/home/561/aat561/R/x86_64-pc-linux-gnu-library/3.3/BH/include" -I"/home/561/aat561/R/x86_64-pc-linux-gnu-library/3.3/rpf/include" -fopenmp -Wall -Wextra -Wno-unknown-pragmas -Wno-unused-parameter -Wvla -Wno-unused-local-typedefs -Wno-deprecated-declarations -fdiagnostics-color=auto -DSHADOW_DIAG -fpic -g -O2 -c Compute.cpp -o Compute.o
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-fdiagnostics-color=auto"
cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedefs"
make: *** [Compute.o] Error 1
ERROR: compilation failed for package 'OpenMx'
* removing '/home/561/aat561/R/x86_64-pc-linux-gnu-library/3.3/OpenMx'
The downloaded source packages are in
'/short/ey6/aat561/tmp/RtmpKeaBDy/downloaded_packages'
Warning message:
In install.packages("OpenMx") :
installation of package 'OpenMx' had non-zero exit status
Log in or register to post comments
how old is your compiler?
gcc --version
Ideally, it should be 5.3 or newer.
Log in or register to post comments
In reply to how old is your compiler? by jpritikin
I changed the compiler to
I changed the compiler to version 6.2.0, the compilation went on for sometime and finally I got the error message:
Is it due to the /usr/bin/ld:../src/libnpsol.a ? If so, please let me know how to fix this.
g++ -std=c++11 -shared -L/apps/R/3.3.0/lib64/R/lib -L/usr/local/lib64 -o OpenMx.so Compute.o ComputeGD.o ComputeNR.o ComputeSD.o FellnerFitFunction.o ba81quad.o dmvnorm.o fitMultigroup.o general.o glue.o matrix.o merge.o nanotimer.o nloptcpp.o omxAlgebra.o omxAlgebraFitFunction.o omxCsolnp.o omxData.o omxExpectation.o omxExpectationBA81.o omxExportBackendState.o omxFIMLFitFunction.o omxFIMLSingleIteration.o omxFitFunction.o omxFitFunctionBA81.o omxGREMLExpectation.o omxGREMLfitfunction.o omxHessianCalculation.o omxImportFrontendState.o omxLISRELExpectation.o omxMLFitFunction.o omxMatrix.o omxNPSOLSpecific.o omxNormalExpectation.o omxRAMExpectation.o omxRFitFunction.o omxRowFitFunction.o omxState.o omxStateSpaceExpectation.o omxSymbolTable.o omxWLSFitFunction.o optimize.o options.o sadmvn.o slsqp.o ssMLFit.o stop.o subnp.o -fopenmp -lifport -lifcore -limf -lsvml -lm -lipgo -lirc -lpthread -lirc_s -ldl -L/apps/intel-ct/16.0.3.210/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -L../src -lnpsol -lifport -lifcore -limf -lsvml -lm -lipgo -lirc -lpthread -lirc_s -ldl -L/apps/R/3.3.0/lib64/R/lib -lR
/usr/bin/ld:../src/libnpsol.a: file format not recognized; treating as linker script
/usr/bin/ld:../src/libnpsol.a:1: syntax error
collect2: error: ld returned 1 exit status
make: *** [OpenMx.so] Error 1
ERROR: compilation failed for package 'OpenMx'
* removing '/home/561/aat561/R/x86_64-pc-linux-gnu-library/3.3/OpenMx'
Log in or register to post comments
In reply to I changed the compiler to by Anbupalam
npsol
Do you need npsol? If not, use 'make cran-install' instead of 'make install'. Otherwise remove src/npsol.a and get a fresh copy from http://openmx.psyc.virginia.edu/OpenMx2/npsol/linux/x86_64/gcc4.8/
Log in or register to post comments