Error message of mxTryhard() with NPSOL optimizer

Posted on
No user picture. Veronica_echo Joined: 02/23/2018
Hi everyone,

I installed OpenMx2.11 thought source('https://openmx.ssri.psu.edu/software/getOpenMx.R') and wanted to switch optimizer by mxOption(NULL,"Default optimizer","NPSOL"), but I got error message
Error in runHelper(model, frontendStart, intervals, silent, suppressWarnings, :
NPSOL is not available in this build. See ?omxGetNPSOL() to download this optimizer

I also had the same error message when I tried to use cluster to run the model.

How can I fix it? Any advice would be appreciated!

Replied on Tue, 12/04/2018 - 10:06
Picture of user. AdminRobK Joined: 01/24/2014

Did you clear R's workspace and restart R after the getOpenMx.R script finished?
Replied on Tue, 12/04/2018 - 11:59
Picture of user. AdminRobK Joined: 01/24/2014

In reply to by Veronica_echo

Also, I failed to open the link http://openmx.psyc.virginia.edu/thread/316.

Try https://openmx.ssri.psu.edu//node/316 , and in the future, do a Content search instead of a Google search.

Thanks for your prompt reply. After restarting R, I got the following error message.

What version of R are you running? Are you running macOS? If so, what version?

Replied on Tue, 12/04/2018 - 13:07
Picture of user. AdminRobK Joined: 01/24/2014

In reply to by Veronica_echo

I see. I don't use a Mac and am not involved in maintaining macOS support for OpenMx, but I'll ask other developers who are to reply to this thread.

I do have two guesses as to what might be going on. My first guess is that our macOS OpenMx build for R v3.5 wasn't correctly statically linked to the OpenMP library (what we use for multithreading under Unix-likes). That has been a recurring problem that rears its ugly head at least once per year. My other guess is that some idiosyncrasy of macOS 10.14.1 "Mojave"--which is not even two months old--is causing the problem, though I think that's rather unlikely.

You mentioned upthread that you also ran into difficulty on the cluster. Would you mind elaborating on that?

Edit: my first guess turned out to be correct.

Replied on Wed, 12/05/2018 - 11:55
Picture of user. AdminRobK Joined: 01/24/2014

In reply to by Veronica_echo

Can we discuss it via email so that I can CC the maintainer of our cluster?

Sure. You have my email address.

Replied on Tue, 12/04/2018 - 13:04
Picture of user. tbates Joined: 07/31/2009

1. I think you don't want "software" in the source URL. So try
`source("https://openmx.ssri.psu.edu/getOpenMx.R")`
2. if you have install.packages("umx"), you can use it's helper to get the NPSOL and travis versions for Mac OS

umx::install.OpenMx("NPSOL")
or
umx::install.OpenMx("travis")

3. I'm not able to replicate the error about "not finding lib" under OpenMx 2.11.5/R 3.5.1


umxVersion()
umx version: 2.9.0
OpenMx version: 2.11.5 [GIT v2.11.5]
R version: R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0
MacOS: 10.14.2
Default optimiser: CSOLNP
NPSOL-enabled?: Yes
OpenMP-enabled?: Yes
You can update OpenMx with:
install.OpenMx(c("NPSOL", "travis", "CRAN"))

Replied on Tue, 12/04/2018 - 13:16
Picture of user. AdminRobK Joined: 01/24/2014

In reply to by tbates

I'm not able to replicate the error about "not finding lib" under OpenMx 2.11.5/R 3.5.1

Is the Mac on which you tried to reproduce the error configured for building OpenMx? Because if so, and if my first suspicion here is correct, then you would certainly not encounter the same error, because the OpenMx build would try to dynamically load the OpenMP library, and succeed.

Replied on Tue, 12/04/2018 - 14:43
Picture of user. AdminNeale Joined: 03/01/2013

Could you please try the following installation instead? I am trying to figure out where the OpenMx version with the missing library originated.

install.packages("https://vipbg.vcu.edu/vipbg/OpenMx2/software/bin/macosx/travis/OpenMx_2.11.5.tgz",repos=NULL)

then restart R and see if it works after that?

The versions I build (and the travis one) should have the libraries attached, due to use of a libtastic.py script - but perhaps it hit a snag.