Code Monkey home page Code Monkey logo

Comments (10)

jfowkes avatar jfowkes commented on September 28, 2024

Hi, this is an issue with CUTEst on Mac (specifically SIFDecode) not being able to find GCC 9, most likely because you have updated GCC to a newer version since installing CUTEst. Please reinstall CUTEst and test SIFDecode:

brew reinstall cutest --without-single
brew test sifdecode

from pycutest.

melodyqxuan avatar melodyqxuan commented on September 28, 2024

Thanks for your reply! I tried to reinstall but the test failed and returned the following:

$ brew test sifdecode
Testing optimizers/cutest/sifdecode
==> /usr/local/Cellar/sifdecode/2.0.1/bin/sifdecoder /usr/local/opt/sifdecode/li
Last 15 lines from /Users/melody/Library/Logs/Homebrew/sifdecode/test.01.sifdecoder:
2020-07-31 13:01:02 -0500

/usr/local/Cellar/sifdecode/2.0.1/bin/sifdecoder
/usr/local/opt/sifdecode/libexec/sif/ROSENBR.SIF

dyld: Library not loaded: /usr/local/opt/gcc/lib/gcc/9/libgfortran.5.dylib
Referenced from: /usr/local/opt/sifdecode/libexec/objects/mac64.osx.gfo/double/run_sifdecode
Reason: image not found
/usr/local/Cellar/sifdecode/2.0.1/bin/sifdecoder: line 451: 7266 Abort trap: 6 $DECODER

ERROR: Error exit from decoding stage. terminating execution.

Error: optimizers/cutest/sifdecode: failed
An exception occurred within a child process:
BuildError: Failed executing: /usr/local/Cellar/sifdecode/2.0.1/bin/sifdecoder /usr/local/opt/sifdecode/libexec/sif/ROSENBR.SIF
/usr/local/Homebrew/Library/Homebrew/formula.rb:2010:in block in system' /usr/local/Homebrew/Library/Homebrew/formula.rb:1948:in open'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1948:in system' /usr/local/Homebrew/Library/Taps/optimizers/homebrew-cutest/sifdecode.rb:77:in block (2 levels) in class:Sifdecode'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0/fileutils.rb:128:in chdir' /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0/fileutils.rb:128:in cd'
/usr/local/Homebrew/Library/Taps/optimizers/homebrew-cutest/sifdecode.rb:76:in block in <class:Sifdecode>' /usr/local/Homebrew/Library/Homebrew/formula.rb:1818:in block (3 levels) in run_test'
/usr/local/Homebrew/Library/Homebrew/utils.rb:474:in with_env' /usr/local/Homebrew/Library/Homebrew/formula.rb:1817:in block (2 levels) in run_test'
/usr/local/Homebrew/Library/Homebrew/formula.rb:900:in with_logging' /usr/local/Homebrew/Library/Homebrew/formula.rb:1816:in block in run_test'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2060:in block in mktemp' /usr/local/Homebrew/Library/Homebrew/mktemp.rb:57:in block in run'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:57:in chdir' /usr/local/Homebrew/Library/Homebrew/mktemp.rb:57:in run'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2059:in mktemp' /usr/local/Homebrew/Library/Homebrew/formula.rb:1810:in run_test'
/usr/local/Homebrew/Library/Homebrew/test.rb:35:in block in <main>' /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0/timeout.rb:93:in block in timeout'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0/timeout.rb:33:in block in catch' /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0/timeout.rb:33:in catch'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0/timeout.rb:33:in catch' /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0/timeout.rb:108:in timeout'
/usr/local/Homebrew/Library/Homebrew/test.rb:34:in `

'

from pycutest.

jfowkes avatar jfowkes commented on September 28, 2024

Thank you for testing, could you please create a new issue upstream at https://github.com/optimizers/homebrew-cutest
It is an issue with their SIFDecode and they should be able to help you resolve it.

from pycutest.

melodyqxuan avatar melodyqxuan commented on September 28, 2024

Thanks for your help!

from pycutest.

melodyqxuan avatar melodyqxuan commented on September 28, 2024

I actually tried to reinstall SIFDecode and I was able to pass the test for sifdecode. However, I encountered a new issue when I try to import the problem:

p = pycutest.import_problem('ROSENBR')
Traceback (most recent call last):
File "", line 1, in
File "/Users/melody/anaconda3/lib/python3.6/site-packages/pycutest/build_interface.py", line 357, in import_problem
raise error
File "/Users/melody/anaconda3/lib/python3.6/site-packages/pycutest/build_interface.py", line 349, in import_problem
return CUTEstProblem(import('%s.%s' % (CACHE_SUBFOLDER, problemDir), globals(), locals(), [str(problemDir)]),
ModuleNotFoundError: No module named 'pycutest_cache_holder.ROSENBR'

from pycutest.

melodyqxuan avatar melodyqxuan commented on September 28, 2024

Hi,

Hi! I was able to fix the issue above, but encountered another issue.

pycutest.import_problem("ROSENBR")
Segmentation fault: 11

I was able to pinpoint the source of segmentation error to function calls to pycutestitf.cpython-36m-darwin.so made in init.py under the problem folder (e.g. pycutest_cache/pycutest_cache_holder/ROSENBR/init.py). In particular, while calling either

(n, m)=_pycutestitf._dims()

or

info=_pycutestitf._setup(efirst, lfirst, nvfirst)

segmentation error will occur. Thanks in advance for your help!

from pycutest.

jfowkes avatar jfowkes commented on September 28, 2024

I actually tried to reinstall SIFDecode and I was able to pass the test for sifdecode.

Ah sorry, yes I forgot sifdecode is installed as a separate homebrew package. Glad you got it working!

Hi! I was able to fix the issue above, but encountered another issue.

pycutest.import_problem("ROSENBR")
Segmentation fault: 11

This is a known issue when using Anaconda, please see the end of the discussion of PyCUTEst Issue #9 (Segmentation Fault 11). Basically Anaconda targets a very old version of MacOS when compiling and you need to tell it to target your current MacOS version (which should be the default but Anaconda developers don't want to change this). You can do this by setting export MACOSX_DEPLOYMENT_TARGET=10.14 (or whatever your current MacOS version is, 10.14=Mojave, 10.15=Catalina, etc) in the terminal before running Anaconda python. You may need to create a new python environment using conda where only PyCUTEst is installed in order for it to work, see the end of the detailed discussion in PyCUTEst Issue #9.

from pycutest.

melodyqxuan avatar melodyqxuan commented on September 28, 2024

Unfortunately, even after setting the target version and a new environment, I'm still getting the segmentation error...

from pycutest.

jfowkes avatar jfowkes commented on September 28, 2024

I see, in that case my only suggestion would be to use homebrew python (brew install python) instead of Anaconda.

from pycutest.

melodyqxuan avatar melodyqxuan commented on September 28, 2024

Thanks:)

from pycutest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.