{"id":28571019,"url":"https://github.com/mrlintern/parallel_linear_solver","last_synced_at":"2025-06-10T18:15:15.329Z","repository":{"id":287460425,"uuid":"964801575","full_name":"MRLintern/Parallel_Linear_Solver","owner":"MRLintern","description":"Software which uses OpenMP to parallelise the three classic Algebraic Iterative Methods: Jacobi, Gauss-Seidel \u0026 Successive Over Relaxation, for solving Systems of the form Ax = b ","archived":false,"fork":false,"pushed_at":"2025-06-03T13:30:40.000Z","size":946,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T23:50:32.300Z","etag":null,"topics":["cpp","cpp17","cpp20","gauss-seidel-method","jacobi-method","numerical-methods","openmp-parallelization","red-black-implementation","sor-method"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MRLintern.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-11T20:09:27.000Z","updated_at":"2025-06-03T13:30:41.000Z","dependencies_parsed_at":"2025-05-06T13:36:13.181Z","dependency_job_id":"3043b0f4-b246-4b35-a6eb-c4f1d774fa74","html_url":"https://github.com/MRLintern/Parallel_Linear_Solver","commit_stats":null,"previous_names":["mrlintern/parallel_linear_solver"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MRLintern%2FParallel_Linear_Solver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MRLintern%2FParallel_Linear_Solver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MRLintern%2FParallel_Linear_Solver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MRLintern%2FParallel_Linear_Solver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MRLintern","download_url":"https://codeload.github.com/MRLintern/Parallel_Linear_Solver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MRLintern%2FParallel_Linear_Solver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259124036,"owners_count":22808880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp17","cpp20","gauss-seidel-method","jacobi-method","numerical-methods","openmp-parallelization","red-black-implementation","sor-method"],"created_at":"2025-06-10T18:15:13.541Z","updated_at":"2025-06-10T18:15:15.314Z","avatar_url":"https://github.com/MRLintern.png","language":"C++","readme":"# Parallel_Linear_Solver\n* `Modern C++` Software which uses __OpenMP__ to __parallelise__ the three classic __Algebraic Iterative Methods__: __Jacobi__, __Gauss-Seidel__ and __Successive Over Relaxation (SOR)__ for solving Systems of the form Ax = b.\n* __Note__: this software looks at __measuring convergence of the solvers__ and __not on solving a large algebraic system of equations__; another time.\n\n## Introduction\n* There is a problem in trying to parallelise the __Gauss-Seidel__ \u0026 __SOR__ methods because they are inherently __sequential__ due to the dependency on the latest updated values within each iteration.\n* However, we can parallelise it partially using a ___Red-Black Ordering Scheme___.\n* However, this scheme is more appropriate for systems where the matrix isn't __dense__.\n* If the matrix is dense, true parallel forms of the methods is tricky, and so the algorithm logic has to be altered.\n* If the matrix is __dense__, we can use ___Graph Colouring___ (AKA ___Multi-Colouring___).\n* Note: `range-based for loops` are used in places, so a compiler which supports `C++20` features is required. However, `OpenMP` still requires __traditional (index-based) for loops__.\n\n## The Iterative Solvers\n* Here is a brief overview of the methods.\n\n### The Jacobi Method\n* __Idea__: Updates each component of the solution vector independently using the values from the previous iteration.\n* __Convergence__: Requires that the `coefficient matrix A` is `diagonally dominant` or `symmetric positive definite`.\n* __Pros__: Simple and parallelizable.\n* __Cons__: Slow convergence compared to the `Gauss-Seidel Method`.\n  \n### The Gauss-Seidel Method\n* __Idea__: Like the `Jacobi Method`, but uses newly updated values as soon as they are available.\n* __Convergence__: Often faster than the `Jacobi Method`. Also needs the `coefficient matrix A` to be `diagonally dominant` or `symmetric positive definite`.\n* __Pros__: Improved convergence over the `Jacobi Method`.\n* __Cons__: `Less parallelizable` due to `data dependencies`. To `parallelise`, you need to apply, for example, the `Red-Black Ordering Scheme`.\n  \n### The Successive Over Relaxation (SOR) Method\n* __Idea__: An extension of the `Gauss-Seidel Method` that uses a ___Relaxation Factor ω___ to potentially `accelerate convergence`.\n* __Parameter__: __ω ∈ (0,2)__.\n    * __ω = 1__: `Gauss-Seidel Method`.\n    * __ω \u003e 1__: `Over-relaxation` (usually speeds up convergence).\n* __Pros__: ___Can___ converge much faster with optimal ω.\n* __Cons__: Requires tuning of ω; not always easy to choose. Values are chosen experimentally. `Less parallelizable` due to `data dependencies`. To `parallelise`, you need to apply, for example, the `Red-Black Ordering Scheme`.\n  \n### Red-Black Ordering Scheme: What is it?\n* This is a technique to organize a __structured grid__ (like a 2D matrix) into two independent groups of points — typically labeled __\"red\"__ and __\"black\"__ like a __chessboard pattern__.\n* Points of one colour can be updated in parallel because none of them directly depend on each other - only on the other colour's points.\n* You alternate updating all the red points and then all the black points in each iteration.\n\n\n## Requirements\n* __Compiler__:`g++ 13.1.0`. \n* __OS__: `Ubuntu 20.04`.\n* `OpenMP`. For __parallelising__ the iterative methods: __Jacobi__, __Gauss-Seidel__ and __SOR__.\n* `CMake`. For building the software.\n* `matplotlib-cpp`. For plotting __Convergence Rates__.\n\n## Instructions for getting and Running the Software\n* `$ git clone git@github.com:MRLintern/Parallel_Linear_Solver.git`\n* `$ cd Parallel_Linear_Solver`\n* `$ mkdir build -p \u0026\u0026 cd build`\n* `$ cmake ..`\n* `$ cmake --build .`\n* `$ ./laPSolver`\n* The `.csv` files are saved in a folder called `Results` (within `build`).\n\n## Results\n* A `Python` script called `plotter.py` is provided to plot the results. This can be found in the `Results` folder.\n* A sample of the results is provided; go to the `Results` directory. You'll find a collated data set and a data set for each algorithm.\n* At present this plots the collated data set.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrlintern%2Fparallel_linear_solver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrlintern%2Fparallel_linear_solver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrlintern%2Fparallel_linear_solver/lists"}