-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong pdlapiv or pdlapv2 output in ScaLAPACK #90
Comments
I raised this issue two months ago when I didn't inspect the source code. Now I have checked the source code and I think it is a bug inside ScaLAPCK. I am happy to provide any assistance needed, please help! |
With further inspection and I finally get the idea of how
And I also find the correct routine, defined in the driver |
Summary: I found an erroneous output when calling
pdlapv2
with the following reproducible example. With inspection of the source codepdlapv2.f
I think it's an algorithm error. (Or I misunderstood the usage of this routine). Please help!I am trying to write some c++ code that calls ScaLAPACK and I encountered this problem.
I want to do a column reordering for a distributed matrix. Following the explanation together with the source code in ScaLAPACK, I find the result confusing. Here is a minimum 4 processes 7x7 matrix, 6x6 block-cyclic example:
The program runs but with errornous output. Which I expect to exchange the first column and the last column of A.
(The output is limited to only the first process can output)
where I expect the second output of
A
will have a different first column.With this question in mind, I went to check
pdlapv2.f
and found the code at line 252-287 handles the caseForward
andColumn
(specified in the parameters).It seems like this code iterates the column block
jb
from the start to the end; broadcasting it to every process in the row, and everyone then does the same job to switch columns to the corresponding ones.So in my case, I set the pivot
7, 2, 3, 4, 5, 6 | 1
such that first process has the first 6 columns, and the second process has the last one column.They work together and then first found
7
when iterating7,2,3,4,5,6
not in correct place ( line 274 in pdlapv2.f ), anddo a switch 7 <--> 1. Then they found
1
not in correct place when iterating the second block1
, and they do again, which is errornous, switch 1 <--> 7.This makes the output errornous, and I want to know if this is intended (which means I misunderstood the routine), or this is a bug.
Thanks for any help!
The text was updated successfully, but these errors were encountered: