Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

The PZGESV subroutine

Ines_F_
Beginner
674 Views

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(DESCA,K_total,K_total,MB_A,NB_A,IRSRC,ICSRC,ICTXT,K_proc,INFO)
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(DESCA,K_total,K_total,MB_A,NB_A,IRSRC,ICSRC,ICTXT,K_tot_proc_max,INFO)
CALL DESCINIT(DESCB,K_total,2*N_Emetteurs_Calcul,MB_B,2*N_Emetteurs_Calcul,IRSRC,ICSRC,ICTXT,K_tot_proc_max,INFO)

Allocate(IPIV(K_tot_proc_max+MB_A));
IA=1;JA=1;IB=1;JB=1;
Allocate(Zreduite_proc_inter(K_tot_proc_max,K_total))

Do ii=1,K_total
    Zreduite_proc_inter(1:K_total_proc,ii) = Zreduite_proc(:,ii)
EndDo
Allocate(Vreduit_proc_inter(K_tot_proc_max,2*N_Emetteurs_Calcul))

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

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.

0 Kudos
1 Reply
Ying_H_Intel
Employee
674 Views

Hi Ines 

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

Best Regards

Ying

0 Kudos
Reply