{"id":13568879,"url":"https://github.com/govertb/GPUGraphLayout","last_synced_at":"2025-04-04T05:30:38.717Z","repository":{"id":26542952,"uuid":"80366690","full_name":"govertb/GPUGraphLayout","owner":"govertb","description":"An experimental GPU accelerated implementation of ForceAtlas2","archived":false,"fork":false,"pushed_at":"2022-07-11T11:48:22.000Z","size":146,"stargazers_count":45,"open_issues_count":5,"forks_count":16,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-11-05T01:34:33.556Z","etag":null,"topics":["cuda","forceatlas2","gephi","graph-algorithms","graph-layout","social-network-analysis","visualization"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/govertb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null}},"created_at":"2017-01-29T19:24:01.000Z","updated_at":"2024-03-22T12:20:32.000Z","dependencies_parsed_at":"2022-08-07T12:00:40.475Z","dependency_job_id":null,"html_url":"https://github.com/govertb/GPUGraphLayout","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/govertb%2FGPUGraphLayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/govertb%2FGPUGraphLayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/govertb%2FGPUGraphLayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/govertb%2FGPUGraphLayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/govertb","download_url":"https://codeload.github.com/govertb/GPUGraphLayout/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247128696,"owners_count":20888232,"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":["cuda","forceatlas2","gephi","graph-algorithms","graph-layout","social-network-analysis","visualization"],"created_at":"2024-08-01T14:00:32.836Z","updated_at":"2025-04-04T05:30:38.427Z","avatar_url":"https://github.com/govertb.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"`graph_viewer` | GPU accelerated graph layout\n=============================================\n\nThis repository contains experimental code for large scale graph layout using the GPU. Currently we only implement the basics of ForceAtlas2, a graph layout algorithm  designed for social network visualization in Gephi\u003csup\u003e[1](#jacomy14),[2](#bastian09)\u003c/sup\u003e. Our implementation of ForceAtlas2 is based on [the open source implementation](https://github.com/gephi/gephi/tree/6efb108718fa67d1055160f3a18b63edb4ca7be2/modules/LayoutPlugin/src/main/java/org/gephi/layout/plugin/forceAtlas2) used in Gephi itself, and considers the graph to be undirected. For force approximation, we use a CUDA implementation of the Barnes-Hut approximation algorithm\u003csup\u003e[3](#barnes86)\u003c/sup\u003e by Martin Burtscher and Keshav Pingali\u003csup\u003e[4](#burtscher11)\u003c/sup\u003e. This implementation is available as part of [LonstarGPU](http://iss.ices.utexas.edu/?p=projects/galois/lonestargpu). The average speedup, compared to a *de facto* CPU implementation of ForceAtlas2, is over 40x. This makes it feasible to compute layouts for networks with millions of nodes and edges. More details and results can be found in:\n\n* G.G. Brinkmann, [K.F.D. Rietveld](https://liacs.leidenuniv.nl/~rietveldkfd) and [F.W. Takes](https://liacs.leidenuniv.nl/~takesfw), [Exploiting GPUs for fast force-directed visualization of large-scale networks](https://dx.doi.org/10.1109/ICPP.2017.47), in Proceedings of the 46th International Conference on Parallel Processing (ICPP), pp. 382-391, 2017.\n\n\n#### Citing\nTo cite this software, please use the aforementioned reference, or the `preferred-citation` section in [CITATION.cff](./CITATION.cff). The latter can be converted to the desired format using [various tools](https://github.com/citation-file-format/citation-file-format/tree/52647a247e9b1a5b04154934f39615b5ee8c4d65#tools-to-work-with-citationcff-files-wrench), or using the _Cite this repository_ button in the _About_ section of [this project's GitHub page](https://github.com/govertb/GPUGraphLayout).\n\n\n#### System Requirements\n\nA CUDA capable GPU. Currently only Linux is supported.\n\n#### Obtaining all code\nThis repository contains a submodule (`lib/pngwriter`). Be sure to run\n```\ngit submodule init \u0026\u0026 git submodule update\n```\nfrom the root of this Git repository before compiling. The code also depends on the `libpng` library (including its development headers). It should be possible to obtain this using the package manager for your Linux distribution.\n\n#### Compiling\nA `Makefile` is located in `builds/linux`. Running\n```\nmake graph_viewer\n```\nfrom this directory compiles `graph_viewer` with CUDA support.\nTo compile without CUDA support, run `make graph_viewer CUDA_SUPPORT=0`.\n\n#### Usage\n`graph_viewer gpu|cpu max_iterations num_snaps sg|wg scale gravity exact|approximate edgelist_path out_path [png|csv|bin]`\n\n\n| Argument             | Description |\n| -------------------- | ----------- |\n| `gpu\\|cpu`           | Choose between a parallel GPU implementation or a serial CPU implementation. |\n| `max_iterations`     | How many iterations of the layout algorithm to run. |\n| `num_snaps`          | Choose how many times during the layout process a visualization should be rendered. |\n| `wg\\|sg`             | Choose between weak gravity (inversely proportional to distance) or strong gravity. |\n| `scale`              | Scale repulsive force. |\n| `gravity`            | Scale gravitational force. |\n| `exact\\|approximate` | Choose between the exact/pairwise $O(\\|V\\|^2)$ repulsive force calculation or the $O(\\|V\\| \\log \\|V\\|)$ approximation using Barnes-Hut (GPU implementation only supports Barnes-Hut). |\n| `edgelist_path`      | Text file (ascii) containing node IDs for each edge on a separate line (whitespace separated). Lines starting with a `#`, the direction of edges, and self-loops are ignored. |\n| `out_path`           | Path to write resulting layout to. |\n\n`[png|csv|bin]` is optional, defaulting to `png`, and determines the format of the layout written to `out_path`.\n\n#### References\n\u003ca name=\"jacomy14\"\u003e\u003csup\u003e1\u003c/sup\u003e\u003c/a\u003e M. Jacomy, T. Venturini, S. Heymann, and M. Bastian, [\"Forceatlas2, a continuous graph layout algorithm for handy network visualization designed for the Gephi software\"](http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0098679), PLoS ONE, vol. 9, no. 6, pp. 1–12, 2014.\n\n\u003ca name=\"bastian09\"\u003e\u003csup\u003e2\u003c/sup\u003e\u003c/a\u003e M. Bastian, S. Heymann, and M. Jacomy, [\"Gephi: an open source software for exploring and manipulating networks.\"](https://aaai.org/ocs/index.php/ICWSM/09/paper/view/154) in Proceedings of International Conference on Web and Social Media (ICWSM), 2009, pp. 361–362.\n\n\u003ca name=\"barnes86\"\u003e\u003csup\u003e3\u003c/sup\u003e\u003c/a\u003eJ. Barnes and P. Hut, [\"A hierarchical O(N log N) force-calculation algorithm\"](https://www.nature.com/nature/journal/v324/n6096/abs/324446a0.html), Nature, vol. 324, pp. 446–449, 1986.\n\n\u003ca name=\"burtscher11\"\u003e\u003csup\u003e4\u003c/sup\u003e\u003c/a\u003e M. Burtscher and K. Pingali, [\"An efficient CUDA implementation of the tree-based Barnes Hut n-body algorithm\"](https://www.sciencedirect.com/science/article/pii/B9780123849885000061), in GPU Computing Gems Emerald Edition, W. mei W. Hwu, Ed., 2011, ch. 6, pp. 75–92.\n\n#### License\nMost source files for this program are released under the GNU Affero General Public License. The license notice in each file provides more information. A copy of the GNU Affero General Public License can be found in the `LICENCE` file.\n\n#### Disclaimer\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgovertb%2FGPUGraphLayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgovertb%2FGPUGraphLayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgovertb%2FGPUGraphLayout/lists"}