Comments (13)
Hi mrbell,
Thanks for reporting this problem. It looks like your compiler does not accept the -fopenmp option. This option is responsible for including the OpenMP libraries for multithreading. In Linux systems the standard C compiler (gcc) already bundles this library, but I honestly don't know about MacOS, as I build and tested everything under Linux.
Are you using gcc as well as your default C compiler? If not, a solution might be installing it.
from proxtv.
Yes, I am using gcc. I am not using the default older version, but an updated version from homebrew.
$ gcc --version
gcc (Homebrew gcc 4.9.2_1) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
My version of clang is the MacOS default which could be an issue.
$ clang++ --version
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
I'm going to try to update llvm tools and see if that fixes the issue.
from proxtv.
Tried updating clang this way:
homebrew install llvm --with-clang
No luck. According to this SO thread, clang does not have OpenMP support on Mac.
I might be able to try installing an OpenMP supported Clang from here: https://clang-omp.github.io/
Is there any possibility of turning off OpenMP support? If so, how would I go about doing it? Honestly performance is not a big concern for me at the moment.
from proxtv.
I apologize for all the inconvenience. In the Matlab version of the package there is an option for compiling not using OpenMP, but I did not include it in the Python version. After this discussion though, it is clear it would be a valuable feature.
I will look into it. In the mean time I will try to spot where exactly the link to OpenMP needs be removed to tell you, so you can use the package as soon as possible.
from proxtv.
That would be great. Thanks for the support!
On Fri, Jun 12, 2015 at 11:34 AM Álvaro Barbero Jiménez <
[email protected]> wrote:
I apologize for all the inconvenience. In the Matlab version of the
package there is an option for compiling not using OpenMP, but I did not
include it in the Python version. After this discussion though, it is clear
it would be a valuable feature.I will look into it. In the mean time I will try to spot where exactly the
link to OpenMP needs be removed to tell you, so you can use the package as
soon as possible.—
Reply to this email directly or view it on GitHub
#12 (comment).
from proxtv.
I don't have access to a mac machine, but I think this may work. Could you please try adding
import os
# Force gcc compiler to prevent issues in mac
os.environ["CC"] = "gcc"
os.environ["CXX"] = "gcc"
to the top of setup.py, then compile the package? This will force the use of gcc, where OpenMP is supported. This way you can avoid calls to clang, I hope. This seems to have worked to other people: http://stackoverflow.com/questions/16737260/how-to-tell-distutils-to-use-gcc
from proxtv.
Thanks for the suggestion. I've tried it and get a different error at this point:
gcc -bundle -undefined dynamic_lookup
-L/usr/local/lib -L/usr/local/opt/sqlite/lib
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/prox_tv/__pycache__/_cffi__xeeb1e175x657f5e69.o
/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/src/condat_fast_tv.o
/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/src/johnsonRyanTV.o
/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/src/LPopt.o
/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/src/TV2Dopt.o
/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/src/TV2DWopt.o
/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/src/TVgenopt.o
/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/src/TVL1opt.o
/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/src/TVL1Wopt.o
/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/src/TVL2opt.o
/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/src/TVLPopt.o
/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/src/TVNDopt.o
/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/src/utils.o
-llapack
-o /Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/_cffi__xeeb1e175x657f5e69.so
-fopenmp
Traceback (most recent call last):
File "setup.py", line 73, in <module>
zip_safe=False,
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 971, in run_command
cmd_obj.ensure_finalized()
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "setup.py", line 24, in finalize_options
self.distribution.ext_modules = get_ext_modules()
File "setup.py", line 16, in get_ext_modules
from prox_tv._prox_tv import _ffi
File "/Users/mbell/Downloads/proxTV-master/prox_tv/__init__.py", line 1, in <module>
from ._prox_tv import *
File "/Users/mbell/Downloads/proxTV-master/prox_tv/_prox_tv.py", line 171, in <module>
libraries=['lapack'])
File "/Users/mbell/Downloads/proxTV-master/.eggs/cffi-1.1.2-py2.7-macosx-10.10-x86_64.egg/cffi/api.py", line 373, in verify
lib = self.verifier.load_library()
File "/Users/mbell/Downloads/proxTV-master/.eggs/cffi-1.1.2-py2.7-macosx-10.10-x86_64.egg/cffi/verifier.py", line 97, in load_library
return self._load_library()
File "/Users/mbell/Downloads/proxTV-master/.eggs/cffi-1.1.2-py2.7-macosx-10.10-x86_64.egg/cffi/verifier.py", line 207, in _load_library
return self._vengine.load_library()
File "/Users/mbell/Downloads/proxTV-master/.eggs/cffi-1.1.2-py2.7-macosx-10.10-x86_64.egg/cffi/vengine_cpy.py", line 155, in load_library
raise ffiplatform.VerificationError(error)
cffi.ffiplatform.VerificationError: importing '/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/_cffi__xeeb1e175x657f5e69.so': dlopen(/Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/_cffi__xeeb1e175x657f5e69.so, 2): Symbol not found: __gfortran_st_write
Referenced from: /Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/_cffi__xeeb1e175x657f5e69.so
Expected in: flat namespace
in /Users/mbell/Downloads/proxTV-master/prox_tv/__pycache__/_cffi__xeeb1e175x657f5e69.so
from proxtv.
Thanks for the report. It seems like you might need gfortran installed as well as gcc, probably due to the linking of the LAPACK/BLAS libraries that proxTV makes use of. Could you please check whether you have gfortran installed? Please also install whathever fortran development packages you can find for your OS.
from proxtv.
I have gfortran installed.
$ gfortran --version
GNU Fortran (Homebrew gcc 4.9.2_1) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
I believe the homebrew package includes the appropriate development libraries/headers.
from proxtv.
Hi again,
My colleage Suvrit suggests that the root cause of this issue might be that in your Mac installation gcc might actually be a symlink to clang and not to gnu gcc. You might have to write the explicit path to gnu gcc in the setup.py file above.
I'm sorry I can't be of more help, but I don't have access to a mac machine. I thought of creating a MacOS virtual machine for testing this, but as it turns out Apple doesn't legally approve virtualizing MacOS on top of non-mac hardware...
from proxtv.
Submitted PR #15 to solve this
from proxtv.
@fabianp , thanks for the PR! Currently I'm overworked with other projects, so my apologies for not checking it yet. I hope I can get back to this project at some point during March.
from proxtv.
This should be solved now thanks to PR #15
from proxtv.
Related Issues (20)
- maximum relevant lambda for tv1_1d
- Python demos images not rendering correctly
- Weighted loss function HOT 4
- Missing docs for lapack pre-requisites HOT 1
- Missing docs for demos dependencies HOT 1
- pls help me in resolving this HOT 2
- Control reaches end of non-void function HOT 1
- Tag 3.2.2 HOT 1
- Precompiled distributions HOT 1
- For complex variables HOT 1
- Prebundled Windows wheels
- 3.3.0 pypi wheels are not valid manylinux wheels HOT 5
- cannot install on macOS or ubuntu HOT 4
- Documentation clarification; monitoring objective functional along iterations HOT 3
- Weighted Objective of the library?
- Please provide either Py3.8 wheels or a sdist on PyPI
- proxtv installation HOT 3
- Second order total variation [feature request] HOT 2
- Behaviour on Mac HOT 1
- plans to port proxtv to numba or cupy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proxtv.