GithubHelp home page GithubHelp logo

Compiling fails on MacOS about pyoctree HOT 8 CLOSED

mhogg avatar mhogg commented on August 23, 2024
Compiling fails on MacOS

from pyoctree.

Comments (8)

mhogg avatar mhogg commented on August 23, 2024

Hi Philipp,

Thanks. I have tried to address different compiler settings in the setup.py file. It works for linux and windows, but I haven't tested it on macosx as I don't have access. My setup.py file (which uses distutils) detects macosx as unix, so it doesn't have any specific macosx settings.

If you give me some more details, I might be able to update my setup.py to suit macosx. I see that you are using gcc via clang, which should accept the -fopenmp flag ok (according to https://stackoverflow.com/questions/35134681/installing-openmp-on-mac-os-x-10-11). So, what did you change to get it working? Did you just remove the fopenmp flag so you are not using openmp? Or are you using a different compiler (which one)? Or is that flag called something else on your system? For example, it is /openmp on windows.

Cheers,
Michael

from pyoctree.

schlegelp avatar schlegelp commented on August 23, 2024

Hi Michael,

To be honest, I got it to work after lots of tinkering. If I remember correctly, the problem might have been that Anaconda ships with a different gcc/clang version - so I had to make it use the system's compiler. Let me try to reproducing this and I will get back to you.

Cheers,
Philipp

from pyoctree.

schlegelp avatar schlegelp commented on August 23, 2024

OK, so the problem appears to be that Anaconda brings it's own compiler which does not support openmp. On a standard Python distribution your setup.py works like a charm. So one way is to force Anaconda to the standard compiler (a pain) or remove the openmp flag.

Might I suggest following in the footsteps of the guys from klustawik2: they mention the issue on their page and have their setup.py allow passing -no-openmp as argument?

from pyoctree.

mhogg avatar mhogg commented on August 23, 2024

from pyoctree.

DupontCai avatar DupontCai commented on August 23, 2024

Same from here, wish you fix the bug soon. Best, Dupont

image

from pyoctree.

mhogg avatar mhogg commented on August 23, 2024

Hi DupontCai,

For now I might just remove all openmp compiler / linking flags from the setup.py file, similar to Philipp's fix above. That way, pyoctree will work on all systems. This should satisfy all Mac users whose gcc do not support openmp.

Shortly I will add a command line option to enable openmp if desired.

Cheers,
Michael

from pyoctree.

mhogg avatar mhogg commented on August 23, 2024

Hi Philipp, DupontCai,

I have created a branch called add_openmp_option which contains a modified setup.py file that should work out of the box for you. I will do some more testing before I merge it into the main branch, but for now you can replace your old setup.py file with this one.

To install pyoctree from source without openmp, use the command:
python setup.py install

To install pyoctree from source with openmp (which means your compiler must support openmp), use the command:
python setup.py install --openmp

Cheers,
Michael

from pyoctree.

mhogg avatar mhogg commented on August 23, 2024

Fixed in release 0.2.4.

from pyoctree.

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.