{"id":17307005,"url":"https://github.com/jeffhammond/bigmpi","last_synced_at":"2025-04-13T06:41:30.040Z","repository":{"id":9237676,"uuid":"11056664","full_name":"jeffhammond/BigMPI","owner":"jeffhammond","description":"Implementation of MPI that supports large counts","archived":false,"fork":false,"pushed_at":"2024-11-27T12:54:49.000Z","size":949,"stargazers_count":48,"open_issues_count":8,"forks_count":12,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-26T23:08:23.403Z","etag":null,"topics":["c","datatype","mpi","mpi-library","mpi-standard"],"latest_commit_sha":null,"homepage":"","language":"M4","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/jeffhammond.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":"2013-06-29T17:36:05.000Z","updated_at":"2025-03-03T22:32:17.000Z","dependencies_parsed_at":"2025-01-02T16:10:28.707Z","dependency_job_id":"842a7ef6-6c33-4552-b2e2-4babfc849ad6","html_url":"https://github.com/jeffhammond/BigMPI","commit_stats":{"total_commits":425,"total_committers":7,"mean_commits":"60.714285714285715","dds":"0.12941176470588234","last_synced_commit":"d50aa2c3ab495cb64489a3fed4f969589550dd7e"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffhammond%2FBigMPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffhammond%2FBigMPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffhammond%2FBigMPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffhammond%2FBigMPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffhammond","download_url":"https://codeload.github.com/jeffhammond/BigMPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675434,"owners_count":21143763,"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":["c","datatype","mpi","mpi-library","mpi-standard"],"created_at":"2024-10-15T12:00:13.699Z","updated_at":"2025-04-13T06:41:30.021Z","avatar_url":"https://github.com/jeffhammond.png","language":"M4","funding_links":[],"categories":[],"sub_categories":[],"readme":"Build Status\n============\n\nWe are still struggling to get Travis working properly.  Right now, only MPICH on Linux is tested and with an artificially low `INT_MAX` (1048576).\n\n[![Build Status](https://travis-ci.org/jeffhammond/BigMPI.svg?branch=master)](https://travis-ci.org/jeffhammond/BigMPI)\n\nBigMPI\n======\n\n_See the ExaMPI14 [paper](http://dl.acm.org/citation.cfm?id=2690884) \n([free copy](https://github.com/jeffhammond/BigMPI-paper))\nfor a detailed analysis of large-count issues in MPI._\n\nInterface to MPI for large messages, i.e. those where the count argument\nexceeds `INT_MAX` but is still less than `SIZE_MAX`.\nBigMPI is designed for the common case where one has a 64b address\nspace and is unable to do MPI communication on more than 2^31 elements\ndespite having sufficient memory to allocate such buffers.\nBigMPI does not attempt to support large-counts on systems where\nC `int` and `void*` are both 32b.\n\n## Motivation\n\nThe MPI standard provides a wide range of communication functions that\ntake a C `int` argument for the element count, thereby limiting this\nvalue to `INT_MAX` or less.\nThis means that one cannot send, e.g. 3 billion bytes using the `MPI_BYTE`\ndatatype, or a vector of 5 billion integers using the `MPI_INT` type, as\ntwo examples.\nThere is a natural workaround using MPI derived datatypes, but this is\na burden on users who today may not be using derived datatypes.\n\nThis project aspires to make it as easy as possible to support arbitrarily\nlarge counts (2^63 elements exceeds the local storage compacity of computers\nfor the foreseeable future).\n\nThis is an example of the code change required to support large counts using\nBigMPI:\n```\n#ifdef BIGMPI\n    MPIX_Bcast_x(stuff, large_count /* MPI_Count */, MPI_BYTE, 0, MPI_COMM_WORLD);\n#else // cannot use count\u003eINT_MAX\n    MPI_Bcast(stuff, not_large_count /* int */, MPI_BYTE, 0, MPI_COMM_WORLD);\n#endif\n```\n\n## Interface\n\nThe API follows the pattern of `MPI_Type_size(_x)` in that all BigMPI\nfunctions are identical to their corresponding MPI ones except that\nthey end with `_x` to indicate that the count arguments have the type\n`MPI_Count` instead of `int`.\nBigMPI functions use the MPIX namespace because they are not in the\nMPI standard.\n\n## Limitations\n\nEven though `MPI_Count` might be 128b, BigMPI only supports\n64b counts (because of `MPI_Aint` limitations and a desire to use `size_t`\nin unit tests), so BigMPI is not going to solve your problem if you\nwant to communicate more than 8 EiB of data in a single message.\nSuch computers do not exist nor is it likely that they will exist\nin the foreseeable future.\n\nBigMPI only supports built-in datatypes.  If you are already using\nderived-datatypes, then you should already be able to handle large\ncounts without BigMPI.\n\nSupport for `MPI_IN_PLACE` is not implemented in some cases and\nimplemented inefficiently in others.\nUsing `MPI_IN_PLACE` is discouraged at the present time.\nWe hope to support it more effectively in the future.\n\nBigMPI requires C99.  If your compiler does not support C99, get a\nnew compiler.\n\nBigMPI only has C bindings right now.\nFortran 2003 bindings are planned.\nIf C++ bindings are important to you, please create an issue for this.\n\n## Supported Functions\n\nI believe that point-to-point, one-sided, broadcast and reductions\nare the only functions worth supporting but I added some of the other\ncollectives anyways.\nThe v-collectives require a point-to-point implementation, but\nwe do not believe this causes a significant loss of performance.\n\n## Technical details\n\n[MPIX_Type_contiguous_x](https://github.com/jeffhammond/BigMPI/blob/master/src/type_contiguous_x.c)\ndoes the heavy lifting.  It's pretty obvious how it works.\nThe datatypes engine will turn this into a contiguous datatype internally \nand thus the underlying communication will be efficient.  \nMPI implementations need to be count-safe for this to work, but they need\nto be count-safe period if the Forum is serious about datatypes being\nthe solution rather than `MPI_Count` everywhere.\n\nAll of the communication functions follow the same pattern, which is\nclearly seen in [MPIX_Send_x](https://github.com/jeffhammond/BigMPI/blob/master/src/sendrecv_x.c).\nI've optimized for the common case when count is smaller than 2^31 \nwith a `likely_if` macro to minimize the performance hit of BigMPI\nfor this more common use case\n(hopefully so that users don't insert a branch for this themselves)\n\nThe most obvious optimization I can see doing is to implement\n`MPIX_Type_contiguous_x` using internals of the MPI implementation \ninstead of calling six MPI datatype functions.\nI have started implemented this in MPICH already: \nhttps://github.com/jeffhammond/mpich/tree/type_contiguous_x.\n\n## Authors\n\n* Jeff Hammond\n* Andreas Schäfer\n* Rob Latham\n\n## Related\n\n* [MPI: A Message-Passing Interface Standard - Version 4.0](https://www.mpi-forum.org/docs/mpi-4.0/mpi40-report.pdf)\n* [BigMPI paper](https://github.com/jeffhammond/BigMPI-paper)\n* [Big MPI--large-count and displacement support--collective chapter](https://github.com/mpi-forum/mpi-issues/issues/80)\n* [MPI Forum Large Count working group](https://github.com/mpiwg-large-count/large-count-issues/issues)\n\n## Background\n\n* [\"Why size_t matters\" by Dan Saks](http://www.embedded.com/electronics-blogs/programming-pointers/4026076/Why-size-t-matters)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffhammond%2Fbigmpi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffhammond%2Fbigmpi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffhammond%2Fbigmpi/lists"}