Skip to content
Snippets Groups Projects
Commit f8e40060 authored by Marco van Oort's avatar Marco van Oort
Browse files

Fix segmentation fault in case all nonzeros are assigned to a single processor in ZeroVolumeSearch

parent 5167511f
Branches master
Tags v4.2.1
No related merge requests found
......@@ -77,10 +77,10 @@ int ZeroVolumeSearch(struct sparsematrix *pM, long weightlo, long weighthi, long
long lo = 0, hi = pM->NrNzElts-1;
do {
while(componentToPartition[rowToComponent[pM->i[lo]]] == 0) {
while(componentToPartition[rowToComponent[pM->i[lo]]] == 0 && lo <= hi) {
++lo;
}
while(componentToPartition[rowToComponent[pM->i[hi]]] == 1) {
while(componentToPartition[rowToComponent[pM->i[hi]]] == 1 && lo <= hi) {
--hi;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment