Hi!
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('https://openmx.ssri.psu.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 'https://openmx.ssri.psu.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’
Thank you for alerting us to this issue. Here are a few possible workarounds while we try to resolve it:
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.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.
Build the package from source on your Macbook Pro, following these instructions.
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).
Thank you for the quick reply! I am sorry for the delay in my thanks. I got it working once I installed R 3.4 and switched the default optimizer to SLSQP. Don't know if the updated R version played any part in the solution.
OK, that's good to hear.
If you require NPSOL (other scripts might set it as an optimizer) you could
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.