UDST / pandana

Pandas Network Analysis by UrbanSim: fast accessibility metrics and shortest paths, using contraction hierarchies :world_map:
http://udst.github.io/pandana
GNU Affero General Public License v3.0
386 stars 84 forks source link

multithreaded installation #104

Closed knaaptime closed 5 years ago

knaaptime commented 5 years ago

I'm pretty sure I've got multithreaded installation working with openmp and clang on osx by using the conda toolchain and changing the extra_link_args in setup.py to '-fopenmp=libiomp5', (that is, everything compiles and runs great)

but it looks like the library no longer outputs the diagnostic message that tells the user how many threads are in use. Is it possible to invoke that somehow so I can see whether its working? Thanks!

smmaurer commented 5 years ago

This sounds neat, I'm going to try it out! Do you know if this would let us distribute Conda builds that are automatically multithreaded on OS X?

I just opened a draft PR that restores the thread count diagnostic message, among other things. I'm not sure why it was removed, probably a mistake.

You can restore it locally by tweaking src/graphalg.cpp and src/shared.h like this: https://github.com/UDST/pandana/pull/109/files#diff-b5456dd6223748303b0929471b1231ed.

knaaptime commented 5 years ago

ah, thanks for the tip on getting the diagnostics back. thats helpful

This sounds neat, I'm going to try it out! Do you know if this would let us distribute Conda builds that are automatically multithreaded on OS X?

that was my expectation, though i'm wondering if somehow clang is the culprit causing trouble with #107

smmaurer commented 5 years ago

Update:

Installing Pandana from Conda Forge now provides multi-threading on OS X (as well as other platforms), beginning with v0.4.3.

And we've added instructions to the documentation for setting up the same compilation toolchain locally: http://udst.github.io/pandana/installation.html#compiling-locally

Big thanks to @knaaptime for opening this issue! I'm closing it now as fully resolved.

knaaptime commented 5 years ago

🙌 this is awesome, thanks for all your hard work on this!