The LAPACK forum has moved to https://github.com/Reference-LAPACK/lapack/discussions.

pdlaprnt

Open discussion regarding features, bugs, issues, vendors, etc.

pdlaprnt

Postby asp » Sat Jul 26, 2008 1:37 pm

Hello,

a couple of questions on PDLAPRNT( M, N, A, IA, JA, DESCA, IRPRNT, ICPRNT, CMATNM, NOUT, WORK )

1. what are other (if any) possible values of NOUT? e.g. NOUT=0 is equivalent to stderr and NOUT=6 to stdout.
what about NOUT=1? does it have any particular meaning?

2. calling pdlaprnt to print out a vector 'b' as follows
Code: Select all
nout = 6; // print to stdout
NRHS = 1; // 1 right hand side

double aux[N]; // N, even though min space should be NB

NP = numroc_(&N, &NB, &myrow, &izero, &nprow);
NQRHS = numroc_(&NRHS, &NB, &mycol, &izero, &npcol);

TMP = max(1, NP);
descinit_(descb, &N, &NRHS, &NB, &iunit, &izero, &izero, &ictxt, &TMP, &info);

'b' contains parts of the solution to a system of linear eqns.
obtained through pdgesv which works just fine.

// now i want the root process (myrow = mycol = 0) to gather all the parts of 'b'
// and print the entire vector out (NOUT = 6)
pdlaprnt_(&NP, &NQRHS, b, &iunit, &iunit, descb, &izero, &izero, "b", &nout, aux); // <-- the program crashes here


causes segmentation fault. what am i doing wrong?
thanks!
asp
 
Posts: 15
Joined: Sat Jul 19, 2008 3:21 pm

Re: pdlaprnt

Postby asp » Sun Jul 27, 2008 4:45 am

it's wierd but if 'aux' is allocated dynamically (e.g. through calloc(NB*NB, sizeof(double))) then pdlaprnt yields seg fault. if however it is a static array aux[NB*NB] then pdlaprnt works fine except that it doesn't print the prefix given by its 9th argument.
is it normal?
asp
 
Posts: 15
Joined: Sat Jul 19, 2008 3:21 pm

Re: pdlaprnt

Postby asp » Sun Jul 27, 2008 4:56 am

problem solved. see this viewtopic.php?f=2&t=697
had to waste days of work to figure this out.
asp
 
Posts: 15
Joined: Sat Jul 19, 2008 3:21 pm


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 8 guests