{"id":16323654,"url":"https://github.com/im-rises/ctwinprimenumberparallel","last_synced_at":"2025-07-22T01:31:26.434Z","repository":{"id":107335679,"uuid":"567437990","full_name":"Im-Rises/cTwinPrimeNumberParallel","owner":"Im-Rises","description":"Program to find twin prime numbers in parallel using OpenMPI","archived":false,"fork":false,"pushed_at":"2023-02-19T21:06:18.000Z","size":150,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-14T14:48:40.043Z","etag":null,"topics":["algorithm","c","mpi","openmpi","parallel","parallel-programming","prime-numbers","twin-prime-numbers"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Im-Rises.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11-17T19:45:08.000Z","updated_at":"2024-02-05T02:51:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"75e59f10-43bc-4cd3-8cea-ab0a5be5ea11","html_url":"https://github.com/Im-Rises/cTwinPrimeNumberParallel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Im-Rises/cTwinPrimeNumberParallel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Im-Rises%2FcTwinPrimeNumberParallel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Im-Rises%2FcTwinPrimeNumberParallel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Im-Rises%2FcTwinPrimeNumberParallel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Im-Rises%2FcTwinPrimeNumberParallel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Im-Rises","download_url":"https://codeload.github.com/Im-Rises/cTwinPrimeNumberParallel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Im-Rises%2FcTwinPrimeNumberParallel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266409463,"owners_count":23924284,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["algorithm","c","mpi","openmpi","parallel","parallel-programming","prime-numbers","twin-prime-numbers"],"created_at":"2024-10-10T22:55:21.239Z","updated_at":"2025-07-22T01:31:26.375Z","avatar_url":"https://github.com/Im-Rises.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cTwinPrimeNumberParallel\n\n\u003cp align=\"center\"\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/59691442/183268126-b3d19e66-8f2d-463a-805e-ae6ef7cc6c01.png\" alt=\"cmakeLogo\" style=\"height:60px;\"/\u003e\n      \u003cimg src=\"https://img.shields.io/badge/C-00599C?style=for-the-badge\u0026logo=c\u0026logoColor=white\" alt=\"cppLogo\" style=\"height:60px;\"/\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/59691442/204111351-40876ca8-3bb8-49a6-96e2-6aa3bfcc21f4.png\" alt=\"mpiLogo\" style=\"height:60px;\"/\u003e\n\u003c/p\u003e\n\n## Description\n\nThis is a simple program that calculates the number of prime and twin prime numbers in a given range.\nIt uses the parallel programming library MPI to parallelize the calculation.\n\nThe Prime algorithm is based on the Sieve of Eratosthenes. The original Algorithm is based on\nMichael J. Quinn's book `Parallel Programming in C with MPI and OpenMP`.\n\nThe implemented algorithm are the following:\n\n- [x] Sequential Sieve of Eratosthenes\n- [x] Parallel Sieve of Eratosthenes\n- [x] Parallel twin prime number finder using MPI_Send and MPI_Recv (V1)\n- [x] Parallel twin prime number finder using MPI_Get with windows (V2)\n\n## Dependencies\n\n- C90\n- CMake or Make\n- C90 compiler (GCC, Clang, MSVC, ...)\n\n## Table of Contents\n\n- [Description](#description)\n- [Dependencies](#Dependencies)\n- [Table of Contents](#table-of-contents)\n- [Quickstart](#Quick-start)\n- [Algorithms](#Algorithms)\n    - [Sequential Prime Number Algorithm](#Sequential-Prime-Number-Algorithm)\n    - [Parallel Prime Number Algorithm](#Parallel-Prime-Number-Algorithm)\n- [Results](#Results)\n- [Speed test](#Speed-test)\n- [Compilation](#Compilation)\n    - [Makefile build](#Makefile-build)\n    - [CMake build](#CMake-build)\n- [How to use](#How-to-use)\n- [Project Architecture](#Project-Architecture)\n- [GitHub Actions](#GitHub-Actions)\n- [Documentations](#Documentation)\n- [Contributors](#Contributors)\n\n## Quick Start\n\nDepending on your operating system you will need to install some libs, they are installed differently depending on your\nsystem, please follow the instructions in the Compilation section.\n\nFor an explanation on `How to use` go to the according section.\n\nThe different algorithms used are described below.\n\nThe finderSeq version is composed of the sequential prime number finder and the sequential twin prime number finder.\n\n## Algorithms\n\nThe algorithm used to calculate the twin prime numbers is the Sieve of Eratosthenes. It is a simple, ancient algorithm\nfor finding all prime numbers up to any given limit. It does so by iteratively marking as composite (i.e., not prime)\nthe multiples of each prime, starting with the multiples of 2.\n\n```algorithm\n1. Create a list of consecutive integers from 2 through n: (2, 3, 4, ..., n).\n2. Initially, let p equal 2, the first prime number.\n3. Enumerate the multiples of p by counting in increments of p from 2p to n, and mark them in the list (these will be 2p, 3p, 4p, ...; the p itself should not be marked).\n4. Find the first number greater than p in the list that is not marked. If there was no such number, stop. Otherwise, let p now equal this new number (which is the next prime), and repeat from step 3.\n5. When the algorithm terminates, the numbers remaining not marked in the list are all the primes below n.\n```\n\nThe algorithm is implemented to count the number of prime numbers in a given range.\n\n### Sequential Prime Number Algorithm\n\n```algorithm\n1. Create a list of consecutive integers from 2 through n: (2, 3, 4, ..., n).\n2. Initially, let k equal 2, the first prime number.\n3. Repeat\n   a) Mark all multiples of k between k^2 and n as composite.\n   b) Find the first number greater than k in the list that is not marked. If there was no such number, stop. Otherwise, let k now equal this new number (which is the next prime), and repeat from step 3.\n4. When the algorithm terminates, the numbers remaining not marked in the list are all the primes below n.\n5. Count the number of prime numbers in the list.\n```\n\n### Parallel Prime Number Algorithm\n\n```algorithm\n1. Create a list of consecutive integers from 2 through n: (2, 3, 4, ..., n). (Each process creates its share of list)\n2. Initially, let p equal 2, the first prime number. (Each process does this)\n3. Repeat\n   a) Mark all multiples of k between k^2 and n as composite. (Each process marks its share of list)\n   b) Find the first number greater than k in the list that is not marked. If there was no such number, stop. Otherwise, let k now equal this new number (which is the next prime), and repeat from step 3. (Process 0 only)\n   c) Broadcast the new value of k to all processes. (Process 0 only)\n4. Reduction of the list of primes.\n5. When the algorithm terminates, the numbers remaining not marked in the list are all the primes below n.\n6. Count the number of prime numbers in the list.\n```\n\n## Details on the implementation\n\nEach parallel version of the algoithm has been modified to work with small ranges.\n\nThe original algorithm from Michael Quinn's book `Parallel Programming in C with MPI and OpenMP` seems to have\nan issue calculating the prime numbers in a range smaller than 10 with 4 processes, it returns 5 prime numbers instead\nof 4.\nThe modified algorithm is the following:\n\n```c\nproc0_size = (n - 1) / p;\n\nif ((2 + proc0_size) \u003c (int)sqrt((double)n))\n{\n    if (!id)\n    {\n        printf(\"Too many processes\\n\");\n    }\n    MPI_Finalize();\n    exit(1);\n}\n```\n\nhas been replaced by the following code:\n\n```c\nif (sqrt(n) \u003e= (double)n / p)\n{\n    if (!id)\n    {\n        printf(\"Error : Too many processes\\n\");\n    }\n    MPI_Finalize();\n    exit(1);\n}\n```\n\nPreventing from having more processes than the square root of the range.\n\n## Results\n\nThe results of the programs are shown in the following table:\n\n| n (upper limit) | machines number | Time V1  | Time V2  | Twin prime numbers |\n|-----------------|-----------------|----------|----------|--------------------|\n| 100000000       | 1               | 2.808879 | 2.95147  | 440312             |\n| 100000000       | 2               | 1.308096 | 1.412506 | 440312             |\n| 100000000       | 3               | 0.946394 | 0.973774 | 440312             |\n| 100000000       | 4               | 0.642441 | 0.695551 | 440312             |\n| 100000000       | 5               | 0.529234 | 0.569689 | 440312             |\n| 100000000       | 6               | 0.434324 | 0.429896 | 440312             |\n| 100000000       | 7               | 0.399249 | 0.413432 | 440312             |\n| 100000000       | 8               | 0.323008 | 0.347013 | 440312             |\n| 100000000       | 9               | 0.302753 | 0.338876 | 440312             |\n| 100000000       | 10              | 0.26638  | 0.290584 | 440312             |\n| 100000000       | 11              | 0.237417 | 0.261102 | 440312             |\n| 100000000       | 12              | 0.258154 | 0.26576  | 440312             |\n| 100000000       | 13              | 0.230347 | 0.238771 | 440312             |\n| 100000000       | 14              | 0.219647 | 0.234258 | 440312             |\n| 100000000       | 15              | 0.216049 | 0.229017 | 440312             |\n| 100000000       | 16              | 0.19889  | 0.213629 | 440312             |\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to see detailed results\u003c/summary\u003e\n\n| n (upper limit) | machines number | Time V1  | Time V2  | Twin prime numbers |\n|-----------------|-----------------|----------|----------|--------------------|\n| 10              | 1               | 0.000053 | 0.000228 | 2                  |\n| 10              | 2               | 0.000265 | 0.001174 | 2                  |\n| 10              | 3               | 0.000323 | 0.002461 | 2                  |\n| 10              | 4               |          |          | 2                  |\n| 10              | 5               |          |          | 2                  |\n| 10              | 6               |          |          | 2                  |\n| 10              | 7               |          |          | 2                  |\n| 10              | 8               |          |          | 2                  |\n| 10              | 9               |          |          | 2                  |\n| 10              | 10              |          |          | 2                  |\n| 10              | 11              |          |          | 2                  |\n| 10              | 12              |          |          | 2                  |\n| 10              | 13              |          |          | 2                  |\n| 10              | 14              |          |          | 2                  |\n| 10              | 15              |          |          | 2                  |\n| 10              | 16              |          |          | 2                  |\n| 100             | 1               | 0.000043 | 0.000215 | 8                  |\n| 100             | 2               | 0.000237 | 0.00134  | 8                  |\n| 100             | 3               | 0.003479 | 0.001748 | 8                  |\n| 100             | 4               | 0.001612 | 0.004303 | 8                  |\n| 100             | 5               | 0.002697 | 0.007367 | 8                  |\n| 100             | 6               | 0.002069 | 0.004391 | 8                  |\n| 100             | 7               | 0.0012   | 0.004815 | 8                  |\n| 100             | 8               | 0.001518 | 0.008082 | 8                  |\n| 100             | 9               | 0.003855 | 0.007261 | 8                  |\n| 100             | 10              |          |          | 8                  |\n| 100             | 11              |          |          | 8                  |\n| 100             | 12              |          |          | 8                  |\n| 100             | 13              |          |          | 8                  |\n| 100             | 14              |          |          | 8                  |\n| 100             | 15              |          |          | 8                  |\n| 100             | 16              |          |          | 8                  |\n| 1000            | 1               | 0.000183 | 0.000252 | 35                 |\n| 1000            | 2               | 0.000232 | 0.001436 | 35                 |\n| 1000            | 3               | 0.00058  | 0.002049 | 35                 |\n| 1000            | 4               | 0.001635 | 0.005213 | 35                 |\n| 1000            | 5               | 0.000947 | 0.003938 | 35                 |\n| 1000            | 6               | 0.0021   | 0.005677 | 35                 |\n| 1000            | 7               | 0.001076 | 0.004761 | 35                 |\n| 1000            | 8               | 0.002279 | 0.008067 | 35                 |\n| 1000            | 9               | 0.001254 | 0.008475 | 35                 |\n| 1000            | 10              | 0.00146  | 0.007181 | 35                 |\n| 1000            | 11              | 0.002341 | 0.015144 | 35                 |\n| 1000            | 12              | 0.002051 | 0.011632 | 35                 |\n| 1000            | 13              | 0.001305 | 0.009518 | 35                 |\n| 1000            | 14              | 0.002554 | 0.013066 | 35                 |\n| 1000            | 15              | 0.001497 | 0.034798 | 35                 |\n| 1000            | 16              | 0.0041   | 0.02542  | 35                 |\n| 10000           | 1               | 0.000165 | 0.000321 | 205                |\n| 10000           | 2               | 0.000599 | 0.00179  | 205                |\n| 10000           | 3               | 0.000649 | 0.002224 | 205                |\n| 10000           | 4               | 0.002252 | 0.004705 | 205                |\n| 10000           | 5               | 0.001673 | 0.004671 | 205                |\n| 10000           | 6               | 0.002435 | 0.004599 | 205                |\n| 10000           | 7               | 0.002261 | 0.006064 | 205                |\n| 10000           | 8               | 0.0022   | 0.008406 | 205                |\n| 10000           | 9               | 0.001977 | 0.007317 | 205                |\n| 10000           | 10              | 0.00192  | 0.008946 | 205                |\n| 10000           | 11              | 0.001892 | 0.009959 | 205                |\n| 10000           | 12              | 0.002271 | 0.009783 | 205                |\n| 10000           | 13              | 0.002849 | 0.010273 | 205                |\n| 10000           | 14              | 0.013783 | 0.013611 | 205                |\n| 10000           | 15              | 0.002218 | 0.012203 | 205                |\n| 10000           | 16              | 0.005288 | 0.013704 | 205                |\n| 100000          | 1               | 0.001173 | 0.001788 | 1224               |\n| 100000          | 2               | 0.001216 | 0.00298  | 1224               |\n| 100000          | 3               | 0.005796 | 0.003283 | 1224               |\n| 100000          | 4               | 0.005458 | 0.00733  | 1224               |\n| 100000          | 5               | 0.002918 | 0.004663 | 1224               |\n| 100000          | 6               | 0.005898 | 0.007053 | 1224               |\n| 100000          | 7               | 0.00229  | 0.005705 | 1224               |\n| 100000          | 8               | 0.004954 | 0.009955 | 1224               |\n| 100000          | 9               | 0.003073 | 0.009845 | 1224               |\n| 100000          | 10              | 0.004389 | 0.012207 | 1224               |\n| 100000          | 11              | 0.004299 | 0.009352 | 1224               |\n| 100000          | 12              | 0.002632 | 0.009647 | 1224               |\n| 100000          | 13              | 0.003848 | 0.011904 | 1224               |\n| 100000          | 14              | 0.005902 | 0.010826 | 1224               |\n| 100000          | 15              | 0.005442 | 0.016598 | 1224               |\n| 100000          | 16              | 0.006033 | 0.01509  | 1224               |\n| 1000000         | 1               | 0.011429 | 0.014362 | 8169               |\n| 1000000         | 2               | 0.00824  | 0.010348 | 8169               |\n| 1000000         | 3               | 0.005953 | 0.015472 | 8169               |\n| 1000000         | 4               | 0.006401 | 0.010918 | 8169               |\n| 1000000         | 5               | 0.010776 | 0.013523 | 8169               |\n| 1000000         | 6               | 0.007204 | 0.011878 | 8169               |\n| 1000000         | 7               | 0.009542 | 0.019755 | 8169               |\n| 1000000         | 8               | 0.006692 | 0.011999 | 8169               |\n| 1000000         | 9               | 0.012837 | 0.02199  | 8169               |\n| 1000000         | 10              | 0.010097 | 0.023918 | 8169               |\n| 1000000         | 11              | 0.016681 | 0.013194 | 8169               |\n| 1000000         | 12              | 0.008815 | 0.013648 | 8169               |\n| 1000000         | 13              | 0.010978 | 0.039109 | 8169               |\n| 1000000         | 14              | 0.009185 | 0.016248 | 8169               |\n| 1000000         | 15              | 0.009272 | 0.018724 | 8169               |\n| 1000000         | 16              | 0.011021 | 0.025345 | 8169               |\n| 10000000        | 1               | 0.141508 | 0.160949 | 58980              |\n| 10000000        | 2               | 0.071351 | 0.083553 | 58980              |\n| 10000000        | 3               | 0.063278 | 0.073145 | 58980              |\n| 10000000        | 4               | 0.049691 | 0.048778 | 58980              |\n| 10000000        | 5               | 0.050554 | 0.054734 | 58980              |\n| 10000000        | 6               | 0.046479 | 0.042268 | 58980              |\n| 10000000        | 7               | 0.037244 | 0.045187 | 58980              |\n| 10000000        | 8               | 0.040999 | 0.037032 | 58980              |\n| 10000000        | 9               | 0.037903 | 0.041825 | 58980              |\n| 10000000        | 10              | 0.038408 | 0.043571 | 58980              |\n| 10000000        | 11              | 0.042799 | 0.046796 | 58980              |\n| 10000000        | 12              | 0.035235 | 0.035868 | 58980              |\n| 10000000        | 13              | 0.036882 | 0.037351 | 58980              |\n| 10000000        | 14              | 0.038998 | 0.036742 | 58980              |\n| 10000000        | 15              | 0.036792 | 0.040683 | 58980              |\n| 10000000        | 16              | 0.03962  | 0.045223 | 58980              |\n| 100000000       | 1               | 2.808879 | 2.95147  | 440312             |\n| 100000000       | 2               | 1.308096 | 1.412506 | 440312             |\n| 100000000       | 3               | 0.946394 | 0.973774 | 440312             |\n| 100000000       | 4               | 0.642441 | 0.695551 | 440312             |\n| 100000000       | 5               | 0.529234 | 0.569689 | 440312             |\n| 100000000       | 6               | 0.434324 | 0.429896 | 440312             |\n| 100000000       | 7               | 0.399249 | 0.413432 | 440312             |\n| 100000000       | 8               | 0.323008 | 0.347013 | 440312             |\n| 100000000       | 9               | 0.302753 | 0.338876 | 440312             |\n| 100000000       | 10              | 0.26638  | 0.290584 | 440312             |\n| 100000000       | 11              | 0.237417 | 0.261102 | 440312             |\n| 100000000       | 12              | 0.258154 | 0.26576  | 440312             |\n| 100000000       | 13              | 0.230347 | 0.238771 | 440312             |\n| 100000000       | 14              | 0.219647 | 0.234258 | 440312             |\n| 100000000       | 15              | 0.216049 | 0.229017 | 440312             |\n| 100000000       | 16              | 0.19889  | 0.213629 | 440312             |\n\n\u003c/details\u003e\n\n\u003e *Note*  \n\u003e The results are indicative and may vary depending on the machine.\n\n## Speed test\n\nThe project is set up with some bash scripts to test the speed of the different algorithms. You can start the test by\nrunning the speedTest.sh script in the speedTest folder.\n\n```bash\n./speedTestMonoComputer.sh \u003cbase n value\u003e \u003cmultiplier\u003e \u003citeration number\u003e\n```\n\nExample :\n\n```bash\n./speedTestMonoComputer.sh 10 10 6\n```\n\nThe output will be printed in the console. You can use a pipe to redirect the output to a file.\n\n```bash\n./speedTestMonoComputer.sh 10 10 6 \u003e output.txt\n```\n\n\u003e *Warning*  \n\u003e You need to build the project before running the script (check the compilation section). You also need to be in\n\u003e the speedTest folder to run the script correctly.\n\n## Compilation\n\nTo compile the program, you can use the makefile or the CMakelists.txt file.\nThe makefile is for the GNU compiler collection (GCC) and the CMakelists.txt file is for the CMake build system.\n\n### Makefile build\n\nTo compile the program using the makefile, first you need to install the GNU compiler collection (GCC) and the MPI\nlibrary.\nThen you can compile the program using the following command:\n\n```bash\nsudo apt-get install gcc\n```\n\n```bash\nsudo apt-get install make\n```\n\n```bash\nsudo apt-get install openmpi-bin openmpi-doc libopenmpi-dev\n```\n\nOnce you have installed the required libraries, you can compile the program using the following command:\n\n```bash\nmake\n```\n\nThe executable file will be located in the `buildMakeFile` folder.\n\n### CMake build\n\nTo compile the program using the CMake build system, first you need to install the CMake build system and the MPI\nlibrary.\nThen you can compile the program using the following command:\n\n```bash\nsudo apt-get install cmake\n```\n\n```bash\ncmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=g++\n```\n\nOnce you have installed the required libraries, you can compile the program using the following command:\n\n```bash\ncmake -B ./build -DCMAKE_BUILD_TYPE=Release\n```\n\n```bash\ncmake --build ./build --config Release\n```\n\nThe executable file will be located in the `build` folder.\n\n## How to use\n\nTo use the program, you need to run the executable file and pass the following arguments:\n\n```bash\nmpirun -np \u003cnumber of processes\u003e ./build/cTwinPrimeNumberParallel \u003cupper limit\u003e\n```\n\nor\n\n```bash\nmpirun -c \u003cnumber of processes\u003e ./build/cTwinPrimeNumberParallel \u003cupper limit\u003e\n```\n\nThe program will calculate the prime numbers in the range [3, upper limit].\n\nThe twin prime program will count the number of twin prime numbers in the range [3, upper limit].\n\n\u003e **Note**  \n\u003e I will not explain how to set up the MPI library for multiple processes from different machines.  \n\u003e You can find more information about it in the [MPI documentation](https://www.open-mpi.org/doc/current/).\n\u003e You can also find more information about the MPI library in the [MPI tutorial](https://mpitutorial.com/tutorials/).\n\u003e The program will only work on your local machine if you use the `mpirun` command with a number of core less than or\n\u003e equal to the number of cores of your machine.\n\n## Project Architecture\n\n~~~\ncTwinPrimeNumberParallel\n├── .github\n│  ├── workflows\n│  │   |── c-cpp.yml\n│  │   |── cmake.yml\n│  │   |── codeql.yml\n│  │   |── cpp-linter.yml\n│  │   |── dependency-review.yml\n│  │   |── flawfinder.yml\n│  │   |── greetings.yml\n│  │   |── label.yml\n│  │   |── stale.yml\n|  ├── labels.yml\n|  ├── release.yml\n├── buildMakeFile\n│   |── *\n├── finderSeq\n|  ├── CMakelists.txt\n|  ├── main.c\n├── PrimeNumberFinderParallel\n|  ├── CMakelists.txt\n|  ├── main.c\n├── test\n|  ├── CMakeLists.txt\n|  ├── *.c\n├── TwinPrimeNumberFinderMpiV1\n|  ├── CMakelists.txt\n|  ├── main.c\n├── TwinPrimeNumberFinderMpiV2\n|  ├── CMakelists.txt\n|  ├── main.c\n├── .clang-format\n├── .clang-tidy\n├── .editorconfig\n├── .gitattributes\n├── .gitignore\n├── CMakelists.txt\n├── CMakePresets.json\n├── CMakeSettings.json\n├── Makefile\n├── README.md\n~~~\n\n## GitHub Actions\n\n[![C/C++ CI](https://github.com/Im-Rises/cTwinPrimeNumberParallel/actions/workflows/c-cpp.yml/badge.svg?branch=main)](https://github.com/Im-Rises/cTwinPrimeNumberParallel/actions/workflows/c-cpp.yml)\n[![CMake](https://github.com/Im-Rises/cTwinPrimeNumberParallel/actions/workflows/cmake.yml/badge.svg?branch=main)](https://github.com/Im-Rises/cTwinPrimeNumberParallel/actions/workflows/cmake.yml)\n[![CodeQL](https://github.com/Im-Rises/cTwinPrimeNumberParallel/actions/workflows/codeql.yml/badge.svg)](https://github.com/Im-Rises/cTwinPrimeNumberParallel/actions/workflows/codeql.yml)\n[![cpp-linter](https://github.com/Im-Rises/cTwinPrimeNumberParallel/actions/workflows/cpp-linter.yml/badge.svg?branch=main)](https://github.com/Im-Rises/cTwinPrimeNumberParallel/actions/workflows/cpp-linter.yml)\n[![flawfinder](https://github.com/Im-Rises/cTwinPrimeNumberParallel/actions/workflows/flawfinder.yml/badge.svg?branch=main)](https://github.com/Im-Rises/cTwinPrimeNumberParallel/actions/workflows/flawfinder.yml)\n\nThis project uses GitHub Actions to build and test the program.\n\n- C/C++ CI: This workflow will build the program using the makefile.\n- CMake: This workflow will build the program using the CMake build system.\n- CodeQL: This workflow will analyze the code to find security vulnerabilities.\n- cpp-linter: This workflow will analyze the code to find bugs and potential vulnerabilities.\n- flawfinder: This workflow will analyze the code to find bugs and potential vulnerabilities.\n\n## Documentation\n\nParallel Programming in C with MPI and OpenMP, Michael J. Quinn, 2003\n\nCode from marius92mc's repository:  \n\u003chttps://github.com/marius92mc/sieve-of-eratosthenes-with-MPI\u003e\n\nSieve of Eratosthenes:  \n\u003chttps://en.wikipedia.org/wiki/Sieve_of_Eratosthenes\u003e\n\nMPI Hello World:  \n\u003chttps://mpitutorial.com/tutorials/mpi-hello-world/\u003e\n\nMPI website:  \n\u003chttps://www.open-mpi.org/\u003e\n\nMPI CMake:  \n\u003chttps://cliutils.gitlab.io/modern-cmake/chapters/packages/MPI.html\u003e\n\nhugin:  \n\u003chttps://www.hugin.com.au/prime/twin.php\u003e\n\n## Contributors\n\nQuentin MOREL:\n\n- @Im-Rises\n- \u003chttps://github.com/Im-Rises\u003e\n\n[![GitHub contributors](https://contrib.rocks/image?repo=Im-Rises/cTwinPrimeNumberParallel)](https://github.com/Im-Rises/cTwinPrimeNumberParallel/graphs/contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fim-rises%2Fctwinprimenumberparallel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fim-rises%2Fctwinprimenumberparallel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fim-rises%2Fctwinprimenumberparallel/lists"}