{"id":46450798,"url":"https://github.com/nncarlson/index-map","last_synced_at":"2026-03-06T00:20:59.851Z","repository":{"id":142373273,"uuid":"455986173","full_name":"nncarlson/index-map","owner":"nncarlson","description":"A Fortran module providing a foundation for distributed arrays in MPI-based SPMD programs","archived":false,"fork":false,"pushed_at":"2026-02-27T22:34:26.000Z","size":495,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-28T03:16:08.543Z","etag":null,"topics":["coarray-fortran","coarrays","fortran","mpi","parallel","parallel-programming","spmd"],"latest_commit_sha":null,"homepage":"","language":"Fortran","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/nncarlson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-05T21:09:19.000Z","updated_at":"2026-02-27T22:34:25.000Z","dependencies_parsed_at":"2025-05-02T23:18:54.564Z","dependency_job_id":null,"html_url":"https://github.com/nncarlson/index-map","commit_stats":{"total_commits":33,"total_committers":1,"mean_commits":33.0,"dds":0.0,"last_synced_commit":"ad2acb24e619f3d445afe5b087e75efe40ab700f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nncarlson/index-map","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nncarlson%2Findex-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nncarlson%2Findex-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nncarlson%2Findex-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nncarlson%2Findex-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nncarlson","download_url":"https://codeload.github.com/nncarlson/index-map/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nncarlson%2Findex-map/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30156269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"ssl_error","status_checked_at":"2026-03-05T22:39:24.771Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["coarray-fortran","coarrays","fortran","mpi","parallel","parallel-programming","spmd"],"created_at":"2026-03-06T00:20:58.913Z","updated_at":"2026-03-06T00:20:59.841Z","avatar_url":"https://github.com/nncarlson.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Index Map\n\nThe `index_map_type` Fortran module provides core capabilities that support\nthe use of distributed arrays in SPMD parallel programs through the `index_map`\nderived type, which describes the mapping of an array's index set to parallel\nprocesses. The mapping allows for overlap between processes, and provides\ncollective array gather procedures and scatter-reduction procedures associated\nwith that overlap.\n\nThere are two implementations of the module: one using MPI located in\n`src/mpi`, and one using Fortran coarrays located in `src/caf`. The\ninterfaces are virtually the same, making it relatively simple for client\ncode to switch between the two versions.\n\n* The MPI version is stable and in production use\n(see [Truchas](https://gitlab.com/truchas/truchas)).\n\n* The coarray version is beta quality. It is fully tested, but its current\nperformance is highly variable. Performance of the example programs is\ncomparable to the MPI version when using the NAG Fortran compiler and its\nshared memory-only implementation of coarrays. However performance is very\npoor when using GFortran / OpenCoarrays, and worse still with the Intel\nFortran compilers and their implementation of coarrays. Links to performance\nresults can be found in this [README](./doc/README.md). This is a work in\nprogress.\n\n### Documentation\n\nDocumentation for the module is in the file\n[`doc/index_map_type.md`](./doc/index_map_type.md).\n\nThe `doc` directory [README](./doc/README.md) has links to some additional\ninformation.\n\n### Examples\nThe `example` directory contains several example programs that illustrate\nthe usage of the `index_map_type` module. These programs are automatically\ncompiled as part of the build process. See its [README](./example/README.md)\nfile for details on the examples and how to run them.\n\n### Compiling\n\nFirst clone the repository:\n```\n$ git clone https://github.com/nncarlson/index-map.git\n$ cd index-map\n```\nThe project uses CMake (version 3.19 or later) to compile the project.\nYou may need to set your `FC` environment variable to the path of your\nFortran compiler before running `cmake` to ensure that CMake finds the\ncorrect compiler.\n\n#### MPI version\n```\n$ mkdir build\n$ cd build\n$ cmake ..\n$ make\n```\nBy default, CMake will configure an optimized \"Release\" build; add the\noption `-DCMAKE_BUILD_TYPE=Debug` to configure a debug build.\n\nIf CMake does not automatically find the MPI installation that matches\nyour Fortran compiler, you can help it by setting the environment variable\n`MPI_HOME` to the root directory of the MPI installation. Note that the MPI\nFortran interface (the `mpi` module) must have been compiled with the same\nFortran compiler being used to compile this project.\n\nThe MPI version has been tested with recent versions of the NAG, Intel OneAPI,\nGCC, and LLVM Fortran compilers.\n\n#### Fortran coarray version\nThis CMake setup understands how to build the coarray version when using one\nof these Fortran compilers (LLVM flang does not yet support coarrays):\n* NAG 7.1 or later with its built-in coarray support for shared-memory systems.\n* Intel OneAPI with its built-in coarray support. Both the classic ifort and\n  the new LLVM-based ifx compiler are supported. The companion Intel MPI package\n  must be installed and Intel's setup script run to configure your environment.\n  The Intel coarray implementation uses MPI under the hood.\n* GFortran with [OpenCoarrays](https://github.com/sourceryinstitute/opencoarrays).\n  OpenCoarrays supplies the implementation of coarrays used by the gfortran\n  compiler. Be sure the `bin` directory of the opencoarrays installation is in\n  your path so that the compiler wrapper `caf` and runner `cafrun` can be found.\n  Set `FC=caf` before running cmake. OpenCoarrays uses MPI under the hood, and\n  at the time of this writing is compatible with MPICH version 4.0, but not 4.1\n  or later. Refer to the OpenCoarrays website for requirements.\n\n```\n$ mkdir build\n$ cd build\n$ cmake .. -DUSE_CAF=Yes\"\n$ make\n```\n### Installation\nThe CMake setup does not currently install a library. It will merely build\nthe unit test programs and example programs. The current thinking is that\na user will simply incorporate the source code for the `index_map_type`\nmodule directly into the source for their application. This could change in\nthe future.\n\n### Testing\nFrom the `build` directory simply run `ctest`:\n```\n$ ctest\nTest project /home/user/index-map/build\n    Start 1: localize\n1/5 Test #1: localize .........................   Passed    0.07 sec\n    Start 2: gather\n2/5 Test #2: gather ...........................   Passed    0.07 sec\n    Start 3: scatter\n3/5 Test #3: scatter ..........................   Passed    0.08 sec\n    Start 4: collate\n4/5 Test #4: collate ..........................   Passed    0.07 sec\n    Start 5: distribute\n5/5 Test #5: distribute .......................   Passed    0.08 sec\n\n100% tests passed, 0 tests failed out of 5\n\nTotal Test time (real) =   0.37 sec\n```\nEach test is actually a collection of sub-tests (about 100 in all);\nrun `ctest -V` to get the verbose output. All tests should pass.\n\nNote: These parallel tests use 4 processes. Without additional options /\nenvironment settings, MPI may refuse to run \"over-subscribed\" when testing\non a system with fewer than 4 cores or hardware threads.  \n\n### License\nThis project is distributed under the terms of the MIT license.\nSee [LICENSE.md](./LICENSE.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnncarlson%2Findex-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnncarlson%2Findex-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnncarlson%2Findex-map/lists"}