forked from opencollab/arpack-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass complex parameters by pointers to constant instead of by value, …
…as Fortran-C bindings expect it This fixes opencollab#123. Both C and C++ tests will no longer crash. But the C test will fail. This might be due to an error in the test itself.
- Loading branch information
Showing
3 changed files
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,7 +116,7 @@ int zn() { | |
int select[ncv]; | ||
double _Complex z[(N+1)*(nev+1)]; | ||
BLASINT ldz = N+1; | ||
double sigma=0; | ||
double _Complex sigma=0; | ||
int k; | ||
for (k=0; k < 3*N; ++k ) | ||
workd[k] = 0; | ||
|
@@ -144,7 +144,7 @@ int zn() { | |
if (iparam[4] != nev) return 1; // check number of ev found by arpack. | ||
|
||
/* call arpack like you would have, but, use zneupd_c instead of zneupd_ */ | ||
zneupd_c(rvec, howmny, select, d, z, ldz, sigma, workev, | ||
zneupd_c(rvec, howmny, select, d, z, ldz, &sigma, workev, | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
10110111
Author
Owner
|
||
bmat, N, which, nev, tol, resid, ncv, V, ldv, iparam, ipntr, | ||
workd, workl, lworkl, rwork, &info); | ||
int i; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Seem wrong. In SRC/zneupd.f sigma is an input: should be passed by value. I let you check this out.