sandialabs/omega_h

Predictive load balancing with scalar metric

joshia5 opened this issue · 2 comments

I am trying to call balance(predictive) with scalar metric tag here:

https://github.com/joshia5/omegah_examples/blob/master/partitioning.cpp

but am getting the following error

Omega_h::DiagDecomp<1> Omega_h::decompose_eigen_dim(Omega_h::Matrix<1, 1>): block: [0,0,0], thread: [0,0,0] Assertion `are_close(roots[0], m[0][0])` failed.
Omega_h::DiagDecomp<1> Omega_h::decompose_eigen_dim(Omega_h::Matrix<1, 1>): block: [0,0,0], thread: [0,1,0] Assertion `are_close(roots[0], m[0][0])` failed.

Is there a way to call predictive load balancing with scalar metric?

I think that example is setting the metric value at vertices equal to the MPI rank they're on? Besides not being parallel-consistent, a metric value of zero is also ill-posed and will likely cause floating-point exceptions. Replacing line 19 with:

Write<Real> metricArray(mesh.nverts(), 1.0, "metricArray");

should be a better starting point.

Thanks for your comment. That worked.
We wanted to work on a test(https://github.com/joshia5/omegah_examples/blob/master/partitioning.cpp) that takes user-provided weights and passes them into the RIB balance routine using this function(https://github.com/joshia5/omega_h/blob/475585deed9a31df6857567c67e6e4add5f2d5b4/src/Omega_h_mesh.cpp#L585).