{"id":13574685,"url":"https://github.com/libocca/occa","last_synced_at":"2025-04-04T18:31:52.056Z","repository":{"id":34472968,"uuid":"38410417","full_name":"libocca/occa","owner":"libocca","description":"Portable and vendor neutral framework for parallel programming on heterogeneous platforms.","archived":false,"fork":false,"pushed_at":"2025-03-25T18:46:00.000Z","size":18553,"stargazers_count":415,"open_issues_count":74,"forks_count":87,"subscribers_count":29,"default_branch":"main","last_synced_at":"2025-03-25T19:29:42.304Z","etag":null,"topics":["c","cpp","cuda","dpcpp","fortran","gpgpu","gpu","hip","hpc","jit","metal","multithreading","oneapi","opencl","openmp","sycl"],"latest_commit_sha":null,"homepage":"https://libocca.org","language":"C++","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/libocca.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":"2015-07-02T04:03:29.000Z","updated_at":"2025-03-18T12:36:07.000Z","dependencies_parsed_at":"2023-02-15T10:31:13.964Z","dependency_job_id":"1c92c1b3-e009-41c5-b2c5-6e60262264ed","html_url":"https://github.com/libocca/occa","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libocca%2Focca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libocca%2Focca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libocca%2Focca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libocca%2Focca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libocca","download_url":"https://codeload.github.com/libocca/occa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247229548,"owners_count":20905073,"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","cpp","cuda","dpcpp","fortran","gpgpu","gpu","hip","hpc","jit","metal","multithreading","oneapi","opencl","openmp","sycl"],"created_at":"2024-08-01T15:00:53.762Z","updated_at":"2025-04-04T18:31:51.400Z","avatar_url":"https://github.com/libocca.png","language":"C++","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://libocca.org\"\u003e\n    \u003cimg alt=\"occa\" src=\"https://libocca.org/assets/images/logo/blue.svg\" width=250\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u0026nbsp;\n\n\u003cdiv align=\"center\"\u003e \n\n[![license](https://img.shields.io/github/license/libocca/occa)](LICENSE)\n![discussions](https://img.shields.io/github/discussions/libocca/occa)\n[![slack](https://img.shields.io/badge/Chat-on%20Slack-%23522653)][OCCA_SLACK]\n![github-ci](https://github.com/libocca/occa/workflows/Build/badge.svg)\n![codecov](https://codecov.io/github/libocca/occa/coverage.svg)\n[![twitter](https://img.shields.io/twitter/url?label=Twitter\u0026style=social\u0026url=https%3A%2F%2Ftwitter.com%2Flibocca)](https://twitter.com/libocca)\n\u003c/div\u003e\n\n\u0026nbsp;\n\n## Performance, Portability, Transparency\n\nOCCA is an open source, portable, and vendor neutral framework for parallel programming on heterogeneous platforms. The OCCA API provides unified models for heterogeneous programming concepts\u0026mdash;such as a device, memory, or kernel\u0026mdash;while the OCCA Kernel Language (OKL) enables the creation of portable device kernels using a directive-based extension to the C-language. \n\nMission critical computational science and engineering applications from the public and private sectors rely on OCCA. Notable users include the U.S. Department of Energy and Shell.\n\n**Key Features**\n\n- **Multiple backends**\u0026mdash;including CUDA, HIP, Data Parallel C++, OpenCL, OpenMP (CPU), and Metal\n- **JIT compilation** and caching of kernels\n- C, C++, and ***Fortran*** language support\n- **Interoperability** with backend API and kernels\n- **Transparency**\u0026mdash;easy to understand how your code is mapped to each platform\n\n\n## Requirements\n\n### Minimum\n\n- [CMake] v3.21 or newer\n- C++17 compiler\n- C11 compiler\n\n### Optional\n\n - Fortan 90 compiler\n - CUDA 9 or later\n - HIP 4.2 or later\n - SYCL 2020 or later\n - OpenCL 2.0 or later\n - OpenMP 4.0 or later\n\n## Build, Test, Install\n\nOCCA uses the [CMake] build system. Checkout the [installation guide](INSTALL.md) for a comprehensive overview of all build settings and instructions for building on [Windows](INSTALL.md#windows) or [Mac OS](INSTALL.md#mac-os). \n\n### Linux \n\nFor convenience, the shell script `configure-cmake.sh` has been provided to drive the CMake build. Compilers, flags, and other build parameters can be adjusted there. By default, this script uses `./build` and `./install` for the build and install directories.\n\nThe following demonstrates a typical sequence of shell commands to build, test, and install occa:\n```shell\n$ ./configure-cmake.sh\n$ cmake --build build --parallel \u003cnumber-of-threads\u003e\n$ ctest --test-dir build --output-on-failure\n$ cmake --install build --prefix install\n```\n\nIf dependencies are installed in a non-standard location, set the corresponding [environment variable](INSTALL.md#dependency-paths) to this path. \n\n\n## Use\n\n### Environment\n\nDuring installation, the [Env Modules](Env_Modules) file `\u003cinstall-prefix\u003e/modulefiles/occa` is generated. When this module is loaded, paths to the installed `bin`, `lib`, and `include` directories are appended to environment variables such as `PATH` and `LD_LIBRARY_PATH`.\n\n### Building an OCCA application\n\nFor convenience, OCCA provides CMake package files which are configured during installation. These package files define an imported target, `OCCA::libocca`, and look for all required dependencies.\n\nFor example, the CMakeLists.txt of downstream projects using OCCA would include\n```cmake\nfind_package(OCCA REQUIRED)\n\nadd_executable(downstream-app ...)\ntarget_link_libraries(downstream-app PRIVATE OCCA::libocca)\n\nadd_library(downstream-lib ...)\ntarget_link_libraries(downstream-lib PUBLIC OCCA::libocca)\n```\n\n### Command-line Interface\n\nThe OCCA command-line interface can be found in `\u003cinstall-prefix\u003e/bin/occa`. This tool can be used to query information about hardware and the configuration of OCCA on a given platform.\n\nFor example, calling `occa info` will available OCCA backends and related hardware specs, while `occa env` display the values of OCCA related environment variables. To see the list of all available options, call `occa --help`.\n\n```shell\n$ occa info\n========+======================+=================================\n CPU(s) | Processor Name       | AMD EPYC 7532 32-Core Processor \n        | Memory               | 251.6 GB                        \n        | Clock Frequency      | 2.4 MHz                         \n        | SIMD Instruction Set | SSE2                            \n        | SIMD Width           | 128 bits                        \n        | L1d Cache Size       |   1 MB                          \n        | L1i Cache Size       |   1 MB                          \n        | L2 Cache Size        |  16 MB                          \n        | L3 Cache Size        | 256 MB                          \n========+======================+=================================\n OpenCL | Platform 0           | NVIDIA CUDA                     \n        |----------------------+---------------------------------\n        | Device 0             | NVIDIA A100-PCIE-40GB           \n        | Device Type          | gpu                             \n        | Compute Cores        | 108                             \n        | Global Memory        | 39.40 GB                        \n========+======================+=================================\n CUDA   | Device Name          | NVIDIA A100-PCIE-40GB           \n        | Device ID            | 0                               \n        | Memory               | 39.40 GB                        \n========+======================+=================================\n```\n\n## Community\n\n### Support\n\nNeed help? Checkout the [repository wiki](https://github.com/libocca/occa/wiki) or ask a question in the [Q\u0026A discussions category](https://github.com/libocca/occa/discussions/categories/q-a).\n\n### Feedback\n\nTo provide feedback, start a conversation in the [general](https://github.com/libocca/occa/discussions/categories/general) or [ideas](https://github.com/libocca/occa/discussions/categories/ideas) discussion categories.\n\n## Acknowledgements\n\nThis work was supported in part by \n- Argonne Leadership Computing Facility, which is a DOE Office of Science User Facility supported under Contract DE-AC02-06CH11357\n- The Exascale Computing Project (17-SC-20-SC), a joint project of the U.S. Department of Energy’s Office of Science and National Nuclear Security Administration, responsible for delivering a capable exascale ecosystem, including software, applications, and hardware technology, to support the nation’s exascale computing imperative\n- The Center for Efficient Exascale Discretizations (CEED), a co-design center within the U.S. Department of Energy Exascale Computing Project.\n- Intel\n- AMD\n- Shell\n\n## License\n\nOCCA is available under a [MIT license](LICENSE.MD)\n\n[OCCA_WEBSITE]: https://libocca.org\n\n[OCCA_SLACK]: https://join.slack.com/t/libocca/shared_invite/zt-4jcnu451-qPpPWUzhm7YQKY_HMhIsIw\n\n[CMake]: https://cmake.org/\n\n[Env_Modules]: https://modules.readthedocs.io/en/latest/index.html\n","funding_links":[],"categories":["Table of Contents","Projects"],"sub_categories":["Energy","HPC"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibocca%2Focca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibocca%2Focca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibocca%2Focca/lists"}