Modifying Exampl1.f to PCGESV

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

Modifying Exampl1.f to PCGESV

Postby Arya_12Winter » Fri Jun 27, 2014 2:45 pm

Hi,

I am having to solve a very large linear system of complex numbers. Since I'm fairly new to Fortran and SCALAPACK, in order to get an idea, I started by trying to solving a 4by4 system using a 2by2 process grid.
i.e. A=[4 1 2 3; -3 3 -1 4;-1 2 5 1;5 4 3 -1] and B=[2; 20; -4; -10]
First I did a slight modification to the matrix initialization routine in example1.f and solved the system as double precision numbers. Works perfect :) Returns the expected B=[-1; 1; -2; 3]

But then I changed the numbers to complex format (changed declarations and all), and called PCGESV instead of PDGESV in example1.f . And it now returns B= [0.874; -0.010; -1.161; 1.117] which is incorrect!!!

I can't figure out what went wrong. I really hope someone who has used PCGESV successfully can help me out!! :? I'd really appreciate it!

This is my first time using this forum, so please let me know if I need to post more info...

Thanks in advance!
Arya_12Winter
 
Posts: 2
Joined: Fri Jun 27, 2014 2:09 pm

Re: Modifying Exampl1.f to PCGESV

Postby Arya_12Winter » Fri Jun 27, 2014 3:27 pm

No worries! I had just missed to change the data declaration in MATINIT to complex. Problem solved 8)
Arya_12Winter
 
Posts: 2
Joined: Fri Jun 27, 2014 2:09 pm


Return to User Discussion

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 3 guests

cron