Parallelization of Boruvka's Algorithm

53 views
Skip to first unread message

Adarsh Kishore

unread,
Apr 12, 2022, 2:41:05 AM4/12/22
to sage-devel
Hi everyone, 

I was going through the file `SAGE_ROOT/src/sage/graphs/spanning_tree.pyx` and I found this in the TODO section
Screenshot from 2022-04-12 12-06-18.png

I read up on Boruvka's algorithm for finding the minimum spanning tree of a graph and have implemented a serialized version of it in Python. Can someone link me to resources on how to parallelize this algorithm?

Adarsh Kishore

unread,
Apr 12, 2022, 9:55:16 AM4/12/22
to sage-devel
I think I might get how to do it. Can I open a ticket for this?

jonatha...@googlemail.com

unread,
Apr 13, 2022, 1:57:46 AM4/13/22
to sage-devel
Sure. Since this is written in cython, using https://cython.readthedocs.io/en/latest/src/userguide/parallelism.html might be a good choice.

This is also used in `src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx`. Note the first two lines of the file. With those lines, you can just do `from cython.parallel cimport ...` and use it.
If your computer has `OpenMP`, this should parallelize.

But depends a bit on the details. You can just cc me (gh-kliem) on the ticket and we can discuss the details from there.

And make sure to mention the ticket number here, so anyone interested can just take a look.

Adarsh Kishore

unread,
Apr 13, 2022, 2:24:34 AM4/13/22
to sage-devel
Thanks! I have opened https://trac.sagemath.org/ticket/33703 and CCed you
Reply all
Reply to author
Forward
0 new messages