{"id":21434352,"url":"https://github.com/z1skgr/openmp-pthreads-parallelcomputing","last_synced_at":"2026-01-24T20:17:20.458Z","repository":{"id":163130790,"uuid":"462798159","full_name":"z1skgr/OpenMP-pthreads-parallelComputing","owner":"z1skgr","description":"Parallization protocols for accelerating algorithm performance","archived":false,"fork":false,"pushed_at":"2024-11-07T13:07:42.000Z","size":6764,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T18:12:20.412Z","etag":null,"topics":["intel","intel-intrinsics","linux","omp","openmp","parallel-computing","posix","pthreads"],"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/z1skgr.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}},"created_at":"2022-02-23T15:39:37.000Z","updated_at":"2024-12-19T09:16:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"005ec45b-91a0-4da4-8429-4c0f56729a2f","html_url":"https://github.com/z1skgr/OpenMP-pthreads-parallelComputing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/z1skgr/OpenMP-pthreads-parallelComputing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z1skgr%2FOpenMP-pthreads-parallelComputing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z1skgr%2FOpenMP-pthreads-parallelComputing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z1skgr%2FOpenMP-pthreads-parallelComputing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z1skgr%2FOpenMP-pthreads-parallelComputing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/z1skgr","download_url":"https://codeload.github.com/z1skgr/OpenMP-pthreads-parallelComputing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z1skgr%2FOpenMP-pthreads-parallelComputing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28736503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T19:23:36.361Z","status":"ssl_error","status_checked_at":"2026-01-24T19:23:28.966Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["intel","intel-intrinsics","linux","omp","openmp","parallel-computing","posix","pthreads"],"created_at":"2024-11-22T23:34:52.252Z","updated_at":"2026-01-24T20:17:20.437Z","avatar_url":"https://github.com/z1skgr.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parallel Computing\n\u003e  Using parallelization protocols/standards for acceleration algorithm's performance\n\n\n\n## Table of contents\n* [General Info](#general-information)\n* [Features](#features)\n* [Prerequisites](#prerequisites)\n* [Setup](#setup)\n* [How to run](#how-to-run)\n* [Acknowledgements](#acknowledgements)\n\n\n## General Information\n_**OpenMP Application Protocol Interface (API)**_ and subset of functions of _**POSIX threadsstandard (pthreads)**_ to speed up the [Smith-Waterman algorithm](https://cs.stanford.edu/people/eroberts/courses/soco/projects/computers-and-the-hgp/smith_waterman.htm) for local\nalignment of sequences. A simplified form of omega statistic, to detect positive selection in DNA sequences. Exports performance statistics. Applied for *N* random data.\n\n\n\n## Features\n* Serial program on SW algorithm [^2][^3]\n* Parallel Standards (_OpenMP[^3][^4], Pthreads[^5][^6][^7]_)\n\nBenchmarked on Intel(R) Core(TM) i7-1065G7 @ 1.30GHz 1.50 GHz with 8GB DDR3 memory.\n\n## Prerequisites \n* Input `.txt` files for test. `D_SIZE` number of pairs of sequences\nof characters, with each sequence being on a separate line or extending to\nmore lines for ease of reading. Read input file and reserve D,Q variables with variables from command line. For more info, see [How to run](#how-to-run).\n\n`dataset.txt`\n```\n2\n\nQ:      abc\nD:      xxxabxcxxxaabbcc\n\nQ:      aaabcd\nD:      abababcabababcd\n```\n\n* Understanding of the SW algorithm\n\n## Output\n1. Total number of Q-D sequence pairs\n2. Total number of cells that got a value\n3. Total number of traceback steps\n4. Total program execution time\n5. Total time to calculate cells \n6. Total time for traceback\n7. CUPS: Cell Updates Per\nsecond based on the total runtime\n8. CUPS based on cell computation time. \n\n## How to run\nOn Linux env, create a folder named `Datasets`  for your `dataset.txt`\n(in `scripting.sh` input file named `D1.txt`, `D2.txt` etc)\n\n```\nhome\n└───user\n   └───Desktop\n       └───project\n           └───Datasets\n```\nOr change the path in `scripting.sh` input file executions\n\n\n1. GCC installation\n```\n$ gcc --version\n$ sudo apt install gcc\n```\n\n### Reference\n1. Compile .c file\n```\ngcc -o newserial newserial.c\n```\n\n2. Run in command-line flags and arguments on linux terminal\n```\n./newserial -name ID -input PATH -match INT1 -mismatch INT2 -gap INT3\n```\nwhere \n* ID =\u003e string for .out file\n* PATH =\u003e .txt path\n* INT =\u003e int variable\n\n\n### OpenMP\n\n1. OpenMP config\n```\n$ echo | cpp -fopenmp -dM | grep -i open\n$ sudo apt install libomp-dev\n```\n\n3. Setting the number of threads[^8]\n```\n$ export OMP_NUM_THREADS=8 \n```\n\n4. Run in command-line flags and arguments on linux terminal\n```\ngcc -fopenmp -o OMPX \u003cOMPa.c\u003e\n./OMPX -name ID -input PATH -match INT1 -mismatch INT2 -gap INT3 -threads INT4\n```\nwhere  \u003cbr\u003e\nTHREADS =\u003e num of threads , and X is the preference on OMP implementation (3 implementation of OMP based on task granularity [^10] the different computation-to-communication ratio)\n* _OMPa_ : Fine grained\n* _OMPb_ : Fine grained\n* _OMPd_ : Course grained\n\n### Pthreads\n\n1. Run in command-line flags and arguments on linux terminal\n```\ngcc -pthread  POSIXX.c -o POSIXX.\n./POSIXX -name ID -input PATH -match INT1 -mismatch INT2 -gap INT3 -threads INT4\n```\nwhere \u003cbr\u003e X is the preference on POSIX implementation (2 implementation of POSIX based on task granularity [^9] the different computation-to-communication ratio)\n\n* _POSIXa_ : Fine\n* _POSIXc_ : Course\n\n\nSee `scripting.sh` [^10] for more..\n\n\n# Setup\nScript  variables initialized as:\n* N = 10000000. \n* Threads = [2 4]\n* Processors = [2 4].\n\n\n\n\n## Acknowledgements\n* This project was implemented for the requirements of the lesson Architecture of Parallel and Distributed Computers\n\n[^1]: https://en.wikipedia.org/wiki/Smith-Waterman_algorithm\n[^2]: https://en.wikipedia.org/wiki/Smith-Waterman_algorithm#Linear\n[^3]: https://computing.llnl.gov/tutorials/openMP/\n[^4]: http://www.openmp.org\n[^5]: https://computing.llnl.gov/tutorials/pthreads/\n[^6]: http://www.cs.cmu.edu/afs/cs/academic/class/15492-f07/www/pthreads.html\n[^7]: https://www.ibm.com/developerworks/library/l-posix1/\n[^8]: Default number of threads (ignoring this command) is defined from the specification of CPU\n[^9]: https://en.wikipedia.org/wiki/Granularity_(parallel_computing)#:~:text=In%20parallel%20computing%2C%20granularity%20%28or%20grain%20size%29%20of,communication%20overhead%20between%20multiple%20processors%20or%20processing%20elements.\n[^10]: Run `scripting.sh` to compile and run all files. Must be executable. \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz1skgr%2Fopenmp-pthreads-parallelcomputing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fz1skgr%2Fopenmp-pthreads-parallelcomputing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz1skgr%2Fopenmp-pthreads-parallelcomputing/lists"}