Closed kevinhkhuynh closed 3 years ago
@kevinhkhuynh This is great! I hope that you will include some tests for randomized SVD.
@kevinhkhuynh This is great! I hope that you will include some tests for randomized SVD.
Yes. Some tests will be included in this PR.
@chldkdtn @dylan-copeland @siuwuncheung This took longer than I thought, but it's ready for review now. Uses pdeqpf to obtain Q in elementary householder format, than uses pdormqr to compute the action of Q. Originally, I computed the action in libROM, but it was way too slow.
Test results were computed using the Matlab script given by Youngsoo. libROM matches with these 2 small tests for the left basis, right basis, and singular values.
Thanks @kevinhkhuynh, this is a great new addition to libROM. There is significant new memory management, so it would be a good idea to run some small tests (serial and parallel) with valgrind to verify there are no memory leaks.
@kevinhkhuynh Can you double check if travis actually uses gtest and all our gtest suites are tested in travis?
The ability to run serial tests with multiple processes have been added and the results are identical to the serial tests.
@kevinhkhuynh Can you double check if travis actually uses gtest and all our gtest suites are tested in travis?
Yes. If you look here at one of the Travis tests run and scroll to the bottom (https://travis-ci.com/github/LLNL/libROM/jobs/468930047), you can see the gtest tests running and passing.
@kevinhkhuynh How did you check if parallel randomized SVD is correct? Did you compare the solution with serial randomized SVD run?
How did you check if parallel randomized SVD is correct? Did you compare the solution with serial randomized SVD run?
Yes, the parallel tests run the serial tests with multiple processes and checks that the solution is the same with the serial randomized SVD run. There is an additional check to make sure that the basis is the correct size on each processor (each processor's basis should be smaller than the original, and since this passes we know it isn't running in serial).
How did you check if parallel randomized SVD is correct? Did you compare the solution with serial randomized SVD run?
Yes, the parallel tests run the serial tests with multiple processes and checks that the solution is the same with the serial randomized SVD run. There is an additional check to make sure that the basis is the correct size on each processor (each processor's basis should be smaller than the original, and since this passes we know it isn't running in serial).
But I still need to run more tests before I change the label to RFR.
How did you check if parallel randomized SVD is correct? Did you compare the solution with serial randomized SVD run?
Yes, the parallel tests run the serial tests with multiple processes and checks that the solution is the same with the serial randomized SVD run. There is an additional check to make sure that the basis is the correct size on each processor (each processor's basis should be smaller than the original, and since this passes we know it isn't running in serial).
For both parallel and serial run, I think you need to use the same random matrix in order to get identical (or close to identical) results. Do you use the same random matrix?
How did you check if parallel randomized SVD is correct? Did you compare the solution with serial randomized SVD run?
Yes, the parallel tests run the serial tests with multiple processes and checks that the solution is the same with the serial randomized SVD run. There is an additional check to make sure that the basis is the correct size on each processor (each processor's basis should be smaller than the original, and since this passes we know it isn't running in serial).
For both parallel and serial run, I think you need to use the same random matrix in order to get identical (or close to identical) results. Do you use the same random matrix?
Yes, randomizedSVD has a parameter that sets a random seed, and the random seed is defaulted to 1 unless the user changes it.
Implementation of randomized SVD using scalapack and qrcp.