The PZGESV subroutine

The PZGESV subroutine

Hello everybody,
Please I need your help to understand the scalapck subroutine PZGESV. 
I am trying to use this subroutine to solve a linear equation system A*X = B where A is a (N by N) matrix distributed as follow :

each process has a local matrix Al of size (Ml by N) and Ml isn't the same for the different processes but of course the sum of the different Ml is equal to N. 

I tried this :

B_A = 4; NB_A = 4; MB_B = 4;
CALL DESCINIT(DESCB,K_total,2*N_Emetteurs_Calcul,MB_B,2*N_Emetteurs_Calcul,IRSRC,ICSRC,ICTXT,K_proc,INFO)

 But since K_proc value is local (it depends on the process), I get an error of ILLEGAL VALUE and INFO = -9 

Then I tried to put my matrices in a local matrix of size K_proc_max x K_total, I didn't get error and INFO = 0 but i had a totally wrong results :

MB_A = 4; NB_A = 4; MB_B = 4;
K_tot_proc_max = maxval(K_total_procs)
CALL DESCINIT(DESCB,K_total,2*N_Emetteurs_Calcul,MB_B,2*N_Emetteurs_Calcul,IRSRC,ICSRC,ICTXT,K_tot_proc_max,INFO)


Do ii=1,K_total
    Zreduite_proc_inter(1:K_total_proc,ii) = Zreduite_proc(:,ii)

Do ii=1,2*N_Emetteurs_Calcul
    Vreduit_proc_inter(1:K_total_proc,ii) = Vreduit_proc(:,ii) 

CALL PZGESV(K_total,2*N_Emetteurs_Calcul,Zreduite_proc_inter,IA,JA,DESCA,IPIV,Vreduit_proc_inter,IB,JB,DESCB,INFO)

I really don't know how to fix it. Can anybody help me please to put it right ? Thank you.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Ines 

Could you please provide the test code completely so we can try? 

Best Regards


Leave a Comment

Please sign in to add a comment. Not a member? Join today