Hi I asked earlier as to how utilize the parallel processing in my code. Now I installed it using the precompiled packages for Ubuntu. does that mean I'll have to reinstall it from source using the openmp option in the configure command? Shubham
On 06/04/2014 12:15 AM, Shubham Bhushan wrote:
Hi
I asked earlier as to how utilize the parallel processing in my code. Now I installed it using the precompiled packages for Ubuntu. does that mean I'll have to reinstall it from source using the openmp option in the configure command? Shubham
No, the ubuntu packages were already compiled with openmp enabled. You can always verify if openmp was enabled or not by calling the show_config() function. You should get something like this on Ubuntu:
>>> graph_tool.show_config() version: 2.2.31 (commit 245d1e2c, Thu Mar 27 11:28:39 2014 +0100) gcc version: 4.8.2 compilation flags: -D_FORTIFY_SOURCE=2 -I/usr/include/python2.7 -I/usr/include -I/usr/lib/python2.7/dist-packages/numpy/core/include/numpy -I/usr/lib/python2.7/dist-packages/scipy -I/usr/include -DSPARSEHASH_PREFIX=google -Wall -Wextra -Wno-unused-local-typedefs -Wno-unused-parameter -O3 -std=gnu++11 -ftemplate-depth-250 -Wno-deprecated -Wno-unknown-pragmas -O3 -fvisibility=default -fvisibility-inlines-hidden -fopenmp -I/usr/include -DSPARSEHASH_PREFIX=google -Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/lib -lpython2.7 install prefix: /usr python dir: /usr/lib/python2.7/dist-packages graph filtering: True openmp: True uname: Linux sputnik 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
The 'openmp: True' line above indicates openmp was enabled during compilation.
Best, Tiago
Hi, I already installed graph_tool from precompiled packages for ubuntu and I'm running dfs_search into a random graph generated earlier. This indicates that I'm running dfs_search with openmp enabled already? I would like to run without openmp just to compare times. It's possible?
thanks!
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 10.11.2015 21:40, vitor wrote:
Hi, I already installed graph_tool from precompiled packages for ubuntu and I'm running dfs_search into a random graph generated earlier. This indicates that I'm running dfs_search with openmp enabled already?
Yes.
I would like to run without openmp just to compare times. It's possible?
You can set the number of threads at run-time to 1, by calling graph_tool.openmp_set_num_threads(1). This effectively turns off openmp.
But note that not all algorithms are parallelizable. DFS search, for instance, cannot be written in parallel, since the vertices must be followed in a specific order.
Best, Tiago