I think this is a simple issue, but I've been unable to figure it out. I'm translating my fortran scalapack code into C and everything has gone smoothly so far. However, I can't seem to figure out how to appropriately call pslaprnt to print my matrices.
Here was my fortran code:
- Code: Select all
CALL PSLAPRNT( M, M, A, 1, 1, DESCA, 0, 0, 'A', 6, WORK )
Here is my new C code (where ONE, ZERO, and SIX are defined elsewhere):
- Code: Select all
char *cmatnm="A";
pslaprnt_(&M, &M, A, &ONE, &ONE, descA, &ZERO, &ZERO, cmatnm, &SIX, WORK);
I suspect my problem is with parameter 9: cmatnm. When I run the code I get:
- Code: Select all
[compute-0-0:12073] *** Process received signal ***
[compute-0-0:12073] Signal: Segmentation fault (11)
[compute-0-0:12073] Signal code: Address not mapped (1)
[compute-0-0:12073] Failing at address: 0x7bf000
I think it's some sort of pointer error with the pslaprnt line (when I remove that line, everything works perfectly of course). Sometimes the code works and sometimes I get this error, depending on what happens in the code above. Any help would be appreciated!
Thanks!
tom

