Problems with requiring OpenMx on Mac OS Sierra 10.12.3
I'm having problems with requiring OpenMx. The installation process itself seems to go smoothly. I am running Mac OS Sierra 10.12.3 (macbook pro 15, mid 2015), R 3.3.3 and OpenMx 2.7.9.
I have tried loading OpenMx from cran/ package installer, but then OpenMx doesn’t seem able to run my script, due to missing NPSOL optimizer, as far as I’m able to understand from the error code. Any help regarding what I'm missing here, would be much appreciated :)
Here's my full downloading attempt, the problem arises when trying to require OpenMx:
> source('http://openmx.psyc.virginia.edu/getOpenMx.R')
You are now installing the latest version of OpenMx.Installing package into ‘/Users/annehuhtamaki/Library/R/3.3/library’
(as ‘lib’ is unspecified)
trying URL 'http://openmx.psyc.virginia.edu/OpenMx2/bin/macosx/mavericks/contrib/3.3/OpenMx_2.7.9.tgz'
Content type 'application/x-gzip' length 27628134 bytes (26.3 MB)
==================================================
downloaded 26.3 MB
The downloaded binary packages are in
/var/folders/sd/1nb70hbj2t12s7wtg7znnzcm0000gn/T//RtmprBkGGg/downloaded_packages
> require(OpenMx)
Loading required package: OpenMx
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Users/annehuhtamaki/Library/R/3.3/library/OpenMx/libs/OpenMx.so':
dlopen(/Users/annehuhtamaki/Library/R/3.3/library/OpenMx/libs/OpenMx.so, 6): Symbol not found: ___addtf3
Referenced from: /Users/annehuhtamaki/Library/R/3.3/library/OpenMx/libs/libquadmath.0.dylib
Expected in: /usr/local/lib/libgcc_s.1.dylib
in /Users/annehuhtamaki/Library/R/3.3/library/OpenMx/libs/libquadmath.0.dylib
> library(OpenMx)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Users/annehuhtamaki/Library/R/3.3/library/OpenMx/libs/OpenMx.so':
dlopen(/Users/annehuhtamaki/Library/R/3.3/library/OpenMx/libs/OpenMx.so, 6): Symbol not found: ___addtf3
Referenced from: /Users/annehuhtamaki/Library/R/3.3/library/OpenMx/libs/libquadmath.0.dylib
Expected in: /usr/local/lib/libgcc_s.1.dylib
in /Users/annehuhtamaki/Library/R/3.3/library/OpenMx/libs/libquadmath.0.dylib
Error: package or namespace load failed for ‘OpenMx’
workarounds
1. Install OpenMx from CRAN in the same manner you would install any other CRAN package. Remove the line of code from your script that switches to NPSOL and use the on-load default optimizer, CSOLNP. Or, change the line to
mxOption(NULL, "Default optimizer", "SLSQP")
to switch to SLSQP.2. Download the latest successful MacOS build from the head of the Git repository's master branch, from here, and install it. Note that you'd be using the "bleeding edge" developers' build of the package, which is up-to-date (i.e., more recent than v2.7.9), but less stable and only minimally tested.
3. Build the package from source on your Macbook Pro, following these instructions.
4. Downgrade to R version 3.2.x, and try again to install the virginia.edu build of OpenMx (admittedly, this is not a very appealing alternative).
Log in or register to post comments
In reply to workarounds by AdminRobK
Thank you!
Log in or register to post comments
In reply to Thank you! by Anne H
OK, that's good to hear.
Log in or register to post comments
In reply to Thank you! by Anne H
If NPSOL needed
source('http://openmx.psyc.virginia.edu/getOpenMx.R')
which I think should be working for OS X Sierra with R3.4. This action would change your current working OpenMx for one that hopefully would work better. If not, then going back to the version you have installed now would be a workaround.
Log in or register to post comments