[MacPorts] #40592: openblas: no such instruction install errors
#40592: openblas: no such instruction install errors ------------------------------+-------------------------------- Reporter: Deil.Christoph@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Keywords: | Port: openblas ------------------------------+-------------------------------- For Mac OS X 10.8 with XCode 5 and the gcc 4.7 openblas variant the build fails with errors such as {{{ no such instruction: `vxorpd %xmm0, %xmm0,%xmm0' }}} Full log: https://gist.github.com/cdeil/6711021 -- Ticket URL: <https://trac.macports.org/ticket/40592> MacPorts <http://www.macports.org/> Ports system for OS X
#40592: openblas: no such instruction install errors -------------------------------+---------------------- Reporter: Deil.Christoph@… | Owner: nicos@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: Port: openblas | -------------------------------+---------------------- Changes (by nicos@…): * status: new => assigned * owner: macports-tickets@… => nicos@… Comment: I changed the default compiler to gcc48 in between (which is the standard default on Macports now), but I don't think this is the issue. It is probably some vectorization flag I don't get on my machine. With some googling, it seems that removing the -march=native flag could do the trick, as shown in the attached diff. If that works, I would be grateful if you could confirm and perhaps attach your openblas_config.h file, as it seems to come from flags I can't test with my hardware. -- Ticket URL: <https://trac.macports.org/ticket/40592#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#40592: openblas: no such instruction install errors -------------------------------+---------------------- Reporter: Deil.Christoph@… | Owner: nicos@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: Port: openblas | -------------------------------+---------------------- Comment (by Deil.Christoph@…): You're right ... I get the same issue with gcc48 I still get an error if I remove the {{{-march=native}}} flag: https://gist.github.com/cdeil/6715785 I couldn't find the the {{{openblas_config.h}}} file: {{{ find /opt/local -name 'openblas_config.h' }}} If you want I can simply give you ssh access to this machine to debug ... it's a build test server for Python projects. OK? -- Ticket URL: <https://trac.macports.org/ticket/40592#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#40592: openblas: no such instruction install errors -------------------------------+---------------------- Reporter: Deil.Christoph@… | Owner: nicos@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: Port: openblas | -------------------------------+---------------------- Comment (by nicos@…): Right, after some search, the Apple assembler cannot handle AVX instructions, which is why it fails. Clang seems to be the only compiler able to deal with these instructions. The attached Portfile version should compile in all cases, by disabling avx for gcc compilers, but at the cost of performance, and adding a clang version which hopefully could compile avx instructions. I couldn't test it though, as my processor is too old to support these instructions, but it is partly based on the Atlas port, which works pretty well. It is also still limited, as the Portfile uses a default fortran compiler without considering other usual variants. -- Ticket URL: <https://trac.macports.org/ticket/40592#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#40592: openblas: no such instruction install errors -------------------------------+---------------------- Reporter: Deil.Christoph@… | Owner: nicos@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: Port: openblas | -------------------------------+---------------------- Comment (by nicos@…): Committed in r111803 with small improvements (use of XCode clang when possible, and detecting avx instruction to choose automatically the best variant). With these, the port should compile in any case, and should also detect the best variant to improve performance depending on the processor. -- Ticket URL: <https://trac.macports.org/ticket/40592#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#40592: openblas: no such instruction install errors -------------------------------+--------------------- Reporter: Deil.Christoph@… | Owner: nicos@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: fixed | Keywords: Port: openblas | -------------------------------+--------------------- Changes (by nicos@…): * status: assigned => closed * resolution: => fixed Comment: Assuming the issue fixed with previous commit. -- Ticket URL: <https://trac.macports.org/ticket/40592#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#40592: openblas: no such instruction install errors -------------------------------+--------------------- Reporter: Deil.Christoph@… | Owner: nicos@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: fixed | Keywords: Port: openblas | -------------------------------+--------------------- Comment (by Deil.Christoph@…): For me the {{{OpenBLAS}}} build still fails with "no such instruction" errors: https://gist.github.com/cdeil/6949043/raw/a27720605d09382b8a4177ffe4941a1789... -- Ticket URL: <https://trac.macports.org/ticket/40592#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#40592: openblas: fails to build with avx instructions -------------------------------+---------------------- Reporter: Deil.Christoph@… | Owner: nicos@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: openblas | -------------------------------+---------------------- Changes (by nicos@…): * status: closed => reopened * version: 2.2.0 => * resolution: fixed => Comment: Oh, ok. Thanks for the feedback. Thanks to your log though, it is possible to see that the library compiles now, which was not the case before, but the tests coded in fortran don't. I changed the fortran compiler in r112143, based (again) on tweaks in the atlas port. This should solve this last issue, but I reopen the ticket for now as it is not fully confirmed yet. -- Ticket URL: <https://trac.macports.org/ticket/40592#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
#40592: openblas: fails to build with avx instructions -------------------------------+---------------------- Reporter: Deil.Christoph@… | Owner: nicos@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: openblas | -------------------------------+---------------------- Comment (by Deil.Christoph@…): The OpenBLAS install now works, thanks! Is there an easy way to run the unit OpenBLAS unit tests to check if everything works? -- Ticket URL: <https://trac.macports.org/ticket/40592#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
#40592: openblas: fails to build with avx instructions -------------------------------+--------------------- Reporter: Deil.Christoph@… | Owner: nicos@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: Port: openblas | -------------------------------+--------------------- Changes (by nicos@…): * status: reopened => closed * resolution: => fixed Comment: The tests are run during the installation, so that a problem in the tests should result in a build error. It is possible to see them when installing the port with debug output. {{{ sudo port -d install OpenBLAS }}} -- Ticket URL: <https://trac.macports.org/ticket/40592#comment:11> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts