Community
cancel
Showing results for
Did you mean: Beginner
38 Views

## Parallel implementation of Jacobi with relaxation Linear Algebraic System Solver version 1.0

Hello all,

Parallel implementation of Jacobi with relaxation Linear Algebraic System
Solver version 1.0

Description:

The Parallel iterative with relaxation method that i programmed here is
designed to be used to solve large sparse systems of linear equations where
the direct methods can exceed available machine memory and/or be extremely
time-consuming. for example the direct method of the Gauss algorithm takes
O(n^2) in the back substitution process and is dominated by the O(n^3)
forward elimination process, that means, if for example an operation takes
10^-9 second and we have 1000 equations , the elimination process in the
Jacobi algorithm will takes 0.7 second, but if we have 10000 equations in
the system , the elimination process in the Gauss algorithm will take 11
minutes !. This is why i have develloped for you the Parallel Jacobi with
relaxation iterative algorithm in Object Pascal, that is very fast.
http://pages.videotron.com/aminer/ParallelJacobiWithRelaxation/pjr.htm
Please look at test.pas example inside the zip file, compile and execute
it...

Algebraic System Solver version 1.0 from:

http://pages.videotron.com/aminer/

Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/

Operating Systems: Win , Linux and Mac (x86).

Required FPC switches: -O3 -Sd -dFPC -dWin32 -dFreePascal

-Sd for delphi mode....

-dUnix for Linux,MacOSX etc.

Required Delphi switches: -DMSWINDOWS -\$H+ -DDelphi

Thank you.
Amine Moulay Ramdane.

2 Replies Beginner
38 Views

Hello,

If you want tocompile Parallel implementation of Jacobi with relaxation
Linear System Solver version 1.0to theWin64 system, just set the CPU=64 in
the defines.inc.

In my Parallel algorithm i use a factor 'lambda' that is assigned a value
between 0 and 2 , if this factor is set between 0 and 1 we call it underrelaxation
and is typically employed to make nonconvergent system converge or to hasten
convergence by dampening out oscillations.
If the value of lambda is comprised between 1 and 2, we call it overrelaxation,
and is designed to 'accelerate' the convergence of an already convergent system.
The approach is also called successive or simultaneous overrelaxation or SOR.
And a theorem due to Kahan shows that SOR fails to converge if it is outside the
interval [0,2] .

Now i have played with the lambda and i have noticed that when you set size
of the matrix to a number, you have to count the number of digits in this number,
for example if the size of the matrix is 2000 , it means the size is 4 digits. Now
i have noticed that to make the system converge you have to set the lambda
to the same number of digits than the size or set it to thenumber of digits than
the size of the matrix+ 1.
Example if the size is 2000you have to set the the number of digits before the comma
and after the comma to the same number of digits than the size or set it to the number of digits
of the size of the matrix +1 , that means that in this exampleto make the system
converge set the lambda to 0,001 or 0,0001.
and if the size of the matrix is 3 , set the lambda to 1 or 0,1 to make the systemconverge.
Thank you.
Amine Moulay Ramdane. Beginner
38 Views

Hello,

Red-black Gauss-Seidel converges twice as fast as Jacobi,
but there are twice as many parallel steps, so the same in practice
Thank you.
Amine Moulay Ramdane. 