[Networkit] An effort for code sanity and cleanups / Miscellaneous / GraphIO formats

Christian Staudt christian.staudt at kit.edu
Sat Aug 8 17:29:43 CEST 2015

I’m for keeping them as they are. One layer of insulation between the user and OpenMP does not hurt.


On 03 Aug 2015, at 16:19, Maximilian Vogel <maximilian.vogel at student.kit.edu> wrote:

>>> // auxiliary/Parallelism became useless/redundant [on the C++ side]
>>> Since we specify OpenMP as a "hard" requirement, the wrappers in auxiliary/Parallelism.h became rather useless, as I also noticed that they aren't used throughout networkit. Currently, the only "use" is the re-wrapping for Python in _NetworKit.pyx. But then these should be wrapped there with auxiliary/Parallelism dropped entirely.
>> I’m not sure I get your point. I think it’s very useful to be able to set the degree of parallelism interactively using networkit.setNumberOfThreads, which is based on Parallelism.h.
> Sure. My point is a practical one: On the C++ side, the functions from Parallelism.h are not used at all and instead of wrapping the wrappers in _NetworKit.pyx:
> cdef extern from "cpp/auxiliary/Parallelism.h" namespace "Aux":
>     void _setNumberOfThreads "Aux::setNumberOfThreads" (int)
>     int _getCurrentNumberOfThreads "Aux::getCurrentNumberOfThreads" ()
>     int _getMaxNumberOfThreads "Aux::getMaxNumberOfThreads" ()
>     void _enableNestedParallelism "Aux::enableNestedParallelism" ()
> the OpenMP functions could be wrapped directly:
> cdef extern from "<omp.h>":
>     void omp_set_num_threads(int nThreads)
>     int omp_get_num_threads()
>     int omp_get_max_threads()
>     void omp_set_nested(int flag)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20150808/92ff6f59/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20150808/92ff6f59/attachment.sig>

More information about the NetworKit mailing list