# Problems with requiring OpenMx on Mac OS Sierra 10.12.3

5 posts / 0 new
Offline
Joined: 03/30/2017 - 04:25
Problems with requiring OpenMx on Mac OS Sierra 10.12.3

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 :)

> 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)
==================================================

> require(OpenMx)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Users/annehuhtamaki/Library/R/3.3/library/OpenMx/libs/OpenMx.so':
Expected in: /usr/local/lib/libgcc_s.1.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':
Expected in: /usr/local/lib/libgcc_s.1.dylib
Error: package or namespace load failed for ‘OpenMx’
Offline
Joined: 01/24/2014 - 12:15
workarounds

Thank you for alerting us to this issue. Here are a few possible workarounds while we try to resolve it:

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).

Offline
Joined: 03/30/2017 - 04:25
Thank you!

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.

Offline
Joined: 01/24/2014 - 12:15
OK, that's good to hear.

OK, that's good to hear.

Offline
Joined: 03/01/2013 - 14:09
If NPSOL needed

If you require NPSOL (other scripts might set it as an optimizer) you could

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.