You are here

Error message of mxTryhard() with NPSOL optimizer

14 posts / 0 new
Last post
Veronica_echo's picture
Offline
Joined: 02/23/2018 - 01:57
Error message of mxTryhard() with NPSOL optimizer

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!

AdminRobK's picture
Offline
Joined: 01/24/2014 - 12:15
restart R?

Did you clear R's workspace and restart R after the getOpenMx.R script finished?

Veronica_echo's picture
Offline
Joined: 02/23/2018 - 01:57
After restarting, still error

Thanks for your prompt reply. After restarting R, I got the following error message. Also, I failed to open the link http://openmx.psyc.virginia.edu/thread/316. How can I fixed it? Thank you.

AdminRobK's picture
Offline
Joined: 01/24/2014 - 12:15
Also, I failed to open the
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?

Veronica_echo's picture
Offline
Joined: 02/23/2018 - 01:57
R: 3.5.1 MacOS: 10.14.1

R: 3.5.1

MacOS: 10.14.1

AdminRobK's picture
Offline
Joined: 01/24/2014 - 12:15
static-linking issue?

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.

Veronica_echo's picture
Offline
Joined: 02/23/2018 - 01:57
cluster

Can we discuss it via email so that I can CC the maintainer of our cluster? I have almost zero knowledge about Linux.

AdminRobK's picture
Offline
Joined: 01/24/2014 - 12:15
go ahead
Can we discuss it via email so that I can CC the maintainer of our cluster?

Sure. You have my email address.

roxmanda's picture
Offline
Joined: 01/30/2016 - 16:39
Error message with NPSOL optimizer

I am having the same problem - so far I have install a new version of R and Open MX and I still get an error for NPSOL. I am using R version 3.6.3 (2020-02-29) with Mac 10.15.5

tbates's picture
Offline
Joined: 07/31/2009 - 14:25
some suggestions & install.OpenMx("NPSOL")
  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")
 
  1. 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"))
AdminRobK's picture
Offline
Joined: 01/24/2014 - 12:15
development machine or not?
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.

AdminNeale's picture
Offline
Joined: 03/01/2013 - 14:09
Install from Travis instead?

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.

Veronica_echo's picture
Offline
Joined: 02/23/2018 - 01:57
This link works

Dr. Neale,

It works. Thank you.

roxmanda's picture
Offline
Joined: 01/30/2016 - 16:39
Error message with NPSOL optimizer

This worked, but why did this work???? I tired 4 different solutions.