{"id":15359090,"url":"https://github.com/santisoler/simpeg-benchmarks-gravity","last_synced_at":"2025-08-21T07:44:20.553Z","repository":{"id":206592861,"uuid":"709565912","full_name":"santisoler/simpeg-benchmarks-gravity","owner":"santisoler","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-21T18:52:56.000Z","size":5607,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-16T04:21:10.565Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/santisoler.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":"2023-10-25T00:11:52.000Z","updated_at":"2024-03-27T13:30:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"e7a6fea3-2577-4e13-a224-86a05b7d7478","html_url":"https://github.com/santisoler/simpeg-benchmarks-gravity","commit_stats":{"total_commits":57,"total_committers":3,"mean_commits":19.0,"dds":"0.24561403508771928","last_synced_commit":"3fa8be80307ca3b8ee5ae5d56c6f76ba75949fd6"},"previous_names":["santisoler/simpeg-benchmarks-gravity"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisoler%2Fsimpeg-benchmarks-gravity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisoler%2Fsimpeg-benchmarks-gravity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisoler%2Fsimpeg-benchmarks-gravity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisoler%2Fsimpeg-benchmarks-gravity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santisoler","download_url":"https://codeload.github.com/santisoler/simpeg-benchmarks-gravity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249024077,"owners_count":21200032,"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":[],"created_at":"2024-10-01T12:43:47.884Z","updated_at":"2025-04-15T07:22:08.752Z","avatar_url":"https://github.com/santisoler.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Benchmarks for comparing gravity simulations in SimPEG\n\n## About\n\nThis repository was created to run benchmarks between the gravity forward model\navailable in [SimPEG][simpeg] [v0.20][simpeg-v0.20] and the new implementation\nof it that was merged in\n[simpeg@eb07ef133a6c5e1714ff1af181147cb172eba97c](https://github.com/simpeg/simpeg/commit/eb07ef133a6c5e1714ff1af181147cb172eba97c).\nThis new implementation\nmakes use of [Numba][numba] and the gravity kernels implemented in\n[Choclo][choclo] to achieve faster run times and handle memory in a more\nefficient way.\n\nThe benchmarks were set up in the Python files located in the `notebooks`\nfolder. They compare the two implementations in different scenarios, varying\nthe number of cells in the mesh, the number of receivers, enabling and\ndisabling parallelization (using both `mutliprocessing` and `dask` for the\nSimPEG v0.20 implementation), and varying the number of threads assigned to\nthe simulation.\n\nThe results were saved as netCDF files (that can be opened with\n[Xarray][xarray]) in the `raw` folder. Figures of these results can be found in\nthe `figs` folder.\n\n![Results of the benchmarks comparing the SimPEG v0.20 and the new\nimplementation of the gravity simulation. The plot shows run times for\ndifferent number of threads. The new implementation proves to be between 2 and\n13 times faster on building the sensitivity matrix, and 4 to 63 times faster\nfor computing only the forward model.](figs/benchmark_n-processes.png)\n\n## Get started\n\nIn order to run these benchmarks, you need to have a Python distribution like\n[Miniforge][miniforge] installed.\n\nThen, clone this repository:\n\n```bash\ngit clone https://github.com/santisoler/simpeg-benchmarks-gravity\ncd simpeg-benchmarks-gravity\n```\n\nAnd create a `conda` environment with all the required dependencies for running\nthese benchmarks:\n\n```bash\nmamba env create -f environment.yml\n```\n\n\u003e **Important**\n\u003e I recommend using `mamba` over `conda` due to its faster speeds for resolving\n\u003e dependencies and installing packages. In case you don't have `mamba` installed,\n\u003e feel free to replace `mamba` with `conda`.\n\n\n## Run the benchmarks\n\nAll benchmarks can be run by executing the Python scripts in `notebooks`\nfolder, and through the `benchmark-memory.sh` script.\n\nAlternatively, we can run all benchmarks by executing the `run.sh` shell\nscript:\n\n```bash\nbash run.sh\n```\n\n\u003e **Important**\n\u003e Most of the benchmarks were designed to be run on a machine with 125 GB of\n\u003e ram and a minimum of 30 threads. If your system doesn't meet these specs, you\n\u003e can modify the scripts to adjust them to your needs.\n\u003e\n\u003e The benchmarks for the \"large problem\" require more memory: up to ~800 GB.\n\n[miniforge]: https://github.com/conda-forge/miniforge\n[simpeg]: https://simpeg.xyz\n[simpeg-v0.20]: https://github.com/simpeg/simpeg/releases/tag/v0.20.0\n[numba]: https://numba.pydata.org\n[choclo]: https://www.fatiando.org/choclo\n[xarray]: https://docs.xarray.dev\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantisoler%2Fsimpeg-benchmarks-gravity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsantisoler%2Fsimpeg-benchmarks-gravity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantisoler%2Fsimpeg-benchmarks-gravity/lists"}