vatai / mpk

Matrix powers kernel
1 stars 0 forks source link

Metis does not support loops #25

Closed vatai closed 5 years ago

vatai commented 5 years ago

The problem

gen generates matrices without diagonal elements i.e. graphs without loops. The main reason for this is probably because metis does not support loops (it can't read the input if it has loops).

This is a bit problematic if we generate graphs with loops, we can't use them for partitioning, which means we can't use them for comp (computing the levels and computation). While on the other hand, we'd need the diagonal elements/loops for the computation.

An additional (possible) issue is that (while trying to "make things nicer") I messed up the order in which the edges are printed in gen2 (compared to the order in gen). This should not mean any problems, but I think it should be mentioned here - just in case.

vatai commented 5 years ago

Solution

Make gen2 output .g0 (as before) and .m0 (with diagonals). Then make a copy of mpkread.c (mpkread2.c) which would read the .m0 file instead of the .g0 file. This will additionally be a good opportunity to read the .val file as well.

Don't forget to modify common.mk to use mpkread2.o.

vatai commented 5 years ago

gen2 and other utilities now also generate a .loop.g0 version with loops. That version of the file should be used for the buffers generation.