{"id":22364580,"url":"https://github.com/c0mm4nd/go-hwloc","last_synced_at":"2026-03-16T22:31:44.433Z","repository":{"id":57504405,"uuid":"230871714","full_name":"c0mm4nd/go-hwloc","owner":"c0mm4nd","description":"Golang binding for hwloc","archived":false,"fork":false,"pushed_at":"2024-02-29T17:33:24.000Z","size":3419,"stargazers_count":2,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2024-11-29T17:49:48.537Z","etag":null,"topics":["golang","hardware-locality","hwloc","netloc"],"latest_commit_sha":null,"homepage":"","language":"Go","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/c0mm4nd.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}},"created_at":"2019-12-30T07:44:03.000Z","updated_at":"2024-10-18T01:20:17.000Z","dependencies_parsed_at":"2022-08-29T20:21:33.973Z","dependency_job_id":null,"html_url":"https://github.com/c0mm4nd/go-hwloc","commit_stats":null,"previous_names":["maoxs2/go-hwloc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0mm4nd%2Fgo-hwloc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0mm4nd%2Fgo-hwloc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0mm4nd%2Fgo-hwloc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0mm4nd%2Fgo-hwloc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c0mm4nd","download_url":"https://codeload.github.com/c0mm4nd/go-hwloc/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228155673,"owners_count":17878025,"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":["golang","hardware-locality","hwloc","netloc"],"created_at":"2024-12-04T17:24:24.199Z","updated_at":"2026-03-16T22:31:44.403Z","avatar_url":"https://github.com/c0mm4nd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-hwloc\n\n[![Build Status](https://travis-ci.com/c0mm4nd/go-hwloc.svg?branch=master)](https://travis-ci.com/c0mm4nd/go-hwloc)\n[![Go Doc](https://godoc.org/godoc.org/github.com/c0mm4nd/go-hwloc?status.svg)](https://godoc.org/github.com/c0mm4nd/go-hwloc)\n\n## Introduction\n\nGolang binding for static hwloc\n\n## Ready\n\nInstall hwloc from your system package manager or compile from the source in https://github.com/open-mpi/hwloc\n\nFor example:\n```bash\n# Static Build\ngit clone https://github.com/open-mpi/hwloc \u0026\u0026 cd hwloc\n./autogen.sh\n./configure --enable-static --disable-shared LDFLAGS=\"-static\"\nmake LDFLAGS=-all-static\nsudo make install\nsudo ldconfig /usr/local/lib\n```\n\n## Usage\n\n```go\nimport hwloc \"github.com/c0mm4nd/go-hwloc\"\n```\n\n## Extra\n\n- Q: Why not assemble hwloc into go lib?\n\nA: hwloc is a very powerful and platform-based native library, so comparing to provide a simple version, I prefer to let developers compile it by their own hands or the binary for their platform.\n\n- Q: Why build fails when using bazel?\n\nA: Bazel compiling project within a sandbox, which disallow linker find the \"external\" library, hwloc, so you should write `BUILD.bazel` and `WORKSPACE` for hwloc before using this go binding lib. Actually, it is what tensorflow does, and you can learn from [their practice](https://github.com/tensorflow/tensorflow/tree/master/third_party/hwloc)\n\n# Hwloc\n\n## Introduction\n\nThe Hardware Locality (hwloc) software project aims at easing the process of\ndiscovering hardware resources in parallel architectures. It offers\ncommand-line tools and a C API for consulting these resources, their locality,\nattributes, and interconnection. hwloc primarily aims at helping\nhigh-performance computing (HPC) applications, but is also applicable to any\nproject seeking to exploit code and/or data locality on modern computing\nplatforms.\n\nhwloc is actually made of two subprojects distributed together:\n\n  * The original hwloc project for describing the internals of computing nodes.\n It is described in details starting at section Hardware Locality (hwloc)\n Introduction.\n  * The network-oriented companion called netloc (Network Locality), described\n in details starting with section Network Locality (netloc).\n\nSee also the Related pages tab above for links to other sections.\n\nNetloc may be disabled, but the original hwloc cannot. Both hwloc and netloc\nAPIs are documented after these sections.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc0mm4nd%2Fgo-hwloc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc0mm4nd%2Fgo-hwloc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc0mm4nd%2Fgo-hwloc/lists"}