{"id":20428398,"url":"https://github.com/bgmp/montecarlo","last_synced_at":"2026-03-11T14:11:35.660Z","repository":{"id":262046373,"uuid":"879104306","full_name":"BGMP/MonteCarlo","owner":"BGMP","description":"PI calculation using the Monte Carlo Method implemented traditionally, and using parallelisation","archived":false,"fork":false,"pushed_at":"2024-12-11T04:05:40.000Z","size":8278,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T21:54:14.096Z","etag":null,"topics":["learn","monte-carlo","openmp","pi","vaadin"],"latest_commit_sha":null,"homepage":"","language":"TeX","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/BGMP.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":"2024-10-27T01:39:36.000Z","updated_at":"2024-12-11T04:05:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"3aafe371-682b-4923-a423-a2814ed5ddbe","html_url":"https://github.com/BGMP/MonteCarlo","commit_stats":null,"previous_names":["bgmp/montecarlo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BGMP%2FMonteCarlo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BGMP%2FMonteCarlo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BGMP%2FMonteCarlo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BGMP%2FMonteCarlo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BGMP","download_url":"https://codeload.github.com/BGMP/MonteCarlo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241969761,"owners_count":20050570,"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":["learn","monte-carlo","openmp","pi","vaadin"],"created_at":"2024-11-15T07:25:51.903Z","updated_at":"2025-12-03T14:02:03.320Z","avatar_url":"https://github.com/BGMP.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Monte Carlo PI Calculation\nThis project implements the Monte Carlo method for approximating the value of $\\pi$, both in a sequential and parallelized version using OpenMP. The parallel implementation takes advantage of multiple CPU threads to improve performance and reduce computation time.\n\n## Building\nFor GUI based building, use the Code::Blocks project file.\n\n## Code Explanation\nIn the main file (`Main.cpp`), the flow of execution is conditioned by the `SECUENCIAL` and `PARALELO` macros, which determine which code section will run. The purpose of this approach is to enable direct comparison between the sequential and parallel versions of the $\\pi$ calculation. Below is a breakdown of each section:\n\n1. **Sequential Version (`SECUENCIAL`)**:\n    - If the `SECUENCIAL` macro is defined, the code runs the $\\pi$ calculation using a single processing thread.\n    - The execution time is measured using the C++ `chrono` library to determine how long the calculation takes.\n    - The estimated value of $\\pi$ and the execution time are printed to the console.\n\n2. **Parallel Version (`PARALELO`)**:\n    - If the `PARALELO` macro is defined, the $\\pi$ calculation is distributed across multiple threads using the `#pragma omp parallel` directive.\n    - Just like in the sequential version, the execution time is measured.\n    - The estimated value of $\\pi$ and the execution time are printed to the console.\n\n## Notes\nThis project was written as part of the Masters in Computer Science course \"Parallel Computing\" at the University of the Bío-Bío.\n\nSome of the TeX/PDF files are in Spanish, as the course was taught in Spanish.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgmp%2Fmontecarlo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbgmp%2Fmontecarlo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgmp%2Fmontecarlo/lists"}