{"id":23207937,"url":"https://github.com/pkestene/euler_kokkos","last_synced_at":"2025-08-19T03:30:37.683Z","repository":{"id":86494659,"uuid":"168991445","full_name":"pkestene/euler_kokkos","owner":"pkestene","description":"Compressible hydro and magneto-hydrodynamics (2nd order Godunov) implemented with MPI+Kokkos","archived":false,"fork":false,"pushed_at":"2024-11-08T22:12:20.000Z","size":1067,"stargazers_count":33,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-08T23:19:56.096Z","etag":null,"topics":["cea","cfd","cmake","cpp","cuda","finite-volume","finite-volume-method","fluid-dynamics","gpu","kokkos","magnetohydrodynamics","mpi","parallel-computing","parallelism","performance-portability"],"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/pkestene.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":"2019-02-03T20:44:23.000Z","updated_at":"2024-11-08T22:12:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c38e09f-9103-47e1-aa0d-9c5494b24d98","html_url":"https://github.com/pkestene/euler_kokkos","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkestene%2Feuler_kokkos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkestene%2Feuler_kokkos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkestene%2Feuler_kokkos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkestene%2Feuler_kokkos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pkestene","download_url":"https://codeload.github.com/pkestene/euler_kokkos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230312448,"owners_count":18206858,"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":["cea","cfd","cmake","cpp","cuda","finite-volume","finite-volume-method","fluid-dynamics","gpu","kokkos","magnetohydrodynamics","mpi","parallel-computing","parallelism","performance-portability"],"created_at":"2024-12-18T17:26:38.710Z","updated_at":"2025-08-19T03:30:37.617Z","avatar_url":"https://github.com/pkestene.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/168991445.svg)](https://zenodo.org/badge/latestdoi/168991445) ![C/C++ CI](https://github.com/pkestene/euler_kokkos/workflows/C/C++%20CI/badge.svg)\n\n# Euler_kokkos\n\n## What is it ?\n\nProvide performance portable (multi-architecture) Kokkos implementation for compressible hydrodynamics (second order, Godunov, MUSCL-Hancock) on cartesian grids.\n\n## Dependencies\n\n* [Kokkos](https://github.com/kokkos/kokkos) library will be built by euler_kokkos using the same flags (architecture, optimization, ...).\n* [cmake](https://cmake.org/) with version \u003e= 3.X (3.X is chosen to meet Kokkos own requirement for CMake; i.e. it might increase in the future)\n\nCurrent application is configured with kokkos library as a git submodule. So you'll need to run the following git commands right after cloning euler_kokkos:\n\n```shell\ngit submodule init\ngit submodule update\n```\n\nKokkos is built with the same flags as the main application.\n\n## Build\n\nA few example builds, with minimal configuration options.\n\n### If you already have Kokkos installed\n\nJust make sure that your env variable `CMAKE_PREFIX_PATH` point to the location where Kokkos where installed. More precisely if Kokkos is installed in `KOKKOS_ROOT`, you add `$KOKKOS_ROOT/lib/cmake` to your `CMAKE_PREFIX_PATH`; this way kokkos will be found automagically by cmake, and the right Kokkos backend will be selected.\n\n```shell\nmkdir -p build; cd build\ncmake -DEULER_KOKKOS_BUILD_KOKKOS=OFF ..\nmake\n```\n\n### Build without MPI / With Kokkos openmp backend\n\n* Create a build directory, configure and make\n\n```shell\nmkdir build; cd build\ncmake -DEULER_KOKKOS_USE_MPI=OFF -DEULER_KOKKOS_BUILD_KOKKOS=ON -DEULER_KOKKOS_BACKEND=OpenMP ..\nmake -j 4\n```\n\nAdd variable CXX on the cmake command line to change the compiler (clang++, icpc, pgcc, ....).\n\n### Build without MPI / With Kokkos cuda backend\n\n* Create a build directory, configure and make\n\n```shell\nmkdir build; cd build\n# If you are compiling and running on the same host, you can omit architecture flags,\n# Kokkos will detect the GPU architecture available on your platform\ncmake -DEULER_KOKKOS_USE_MPI=OFF -DEULER_KOKKOS_BUILD_KOKKOS=ON -DEULER_KOKKOS_BACKEND=Cuda -DKokkos_ARCH_MAXWELL50=ON ..\nmake -j 4\n```\n\n`nvcc_wrapper` is a compiler wrapper arroud NVIDIA `nvcc`. It is available from Kokkos sources: `external/kokkos/bin/nvcc_wrapper`. Any Kokkos application target NVIDIA GPUs must be built with `nvcc_wrapper`.\n\n### Build with MPI / With Kokkos cuda backend\n\nPlease make sure to use a CUDA-aware MPI implementation (OpenMPI or MVAPICH2) built with the proper flags for activating CUDA support.\n\nIt may happen that eventhough your MPI implementation is actually cuda-aware, cmake find_package macro for MPI does not detect it to be cuda aware. In that case, you can enforce cuda awareness by turning option `EULER_KOKKOS_USE_MPI_CUDA_AWARE_ENFORCED` to ON.\n\nYou don't need to use mpi compiler wrapper mpicxx, cmake *should* be able to correctly populate `MPI_CXX_INCLUDE_PATH`, `MPI_CXX_LIBRARIES` which are passed to all final targets.\n\n* Create a build directory, configure and make\n\n```shell\nmkdir build; cd build\ncmake -DEULER_KOKKOS_USE_MPI=ON -DEULER_KOKKOS_BUILD_KOKKOS=ON -DEULER_KOKKOS_BACKEND=Cuda -DKokkos_ARCH_MAXWELL50=ON ..\nmake -j 4\n```\n\nExample command line to run the application (1 GPU used per MPI task)\n\n```shell\nmpirun -np 4 ./euler_kokkos ./test_implode_2D_mpi.ini\n```\n\n### Build for AMD GPU with Kokkos Hip backend\n\nMake sure to have rocm/hip tools with version at least 5.2 if build against kokkos 4.0.\n\nFor example:\n\n```shell\nmkdir build/hip; cd build/hip\nexport CXX=hipcc\ncmake -DEULER_KOKKOS_USE_MPI=ON -DEULER_KOKKOS_BUILD_KOKKOS=ON -DEULER_KOKKOS_BACKEND=HIP -DKokkos_ARCH_VEGA90A=ON ..\nmake -j 4\n```\n\n\n### Developing with vim or emacs and semantic completion/navigation from ccls\n\nMake sure to have CMake variable `CMAKE_EXPORT_COMPILE_COMMANDS` set to ON, it will generate a file named _compile_commands.json_.\nThen you can symlink the generated file in the top level source directory.\n\nPlease visit :\n* [ccls](https://github.com/MaskRay/ccls)\n* [editor configuration for using ccls](https://github.com/MaskRay/ccls/wiki/Editor-Configuration)\n* [project setup for using ccls](https://github.com/MaskRay/ccls/wiki/Project-Setup)\n\n## Build Documentation\n\nA Sphinx/html documentation will (hopefully) soon be populated.\n\nTo build it:\n\n``` shell\nmkdir -p build/doc\ncd build/doc\n# build doxygen documentation\ncmake .. -DEULER_KOKKOS_BUILD_DOC:BOOL=ON -DEULER_KOKKOS_DOC_TYPE:STRING=doxygen\n# build sphinx/html documentation\ncmake .. -DEULER_KOKKOS_BUILD_DOC:BOOL=ON -DEULER_KOKKOS_DOC_TYPE:STRING=html\n```\n\nBuilding sphinx documentation requires to have python3 with up-to-date breathe extension.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkestene%2Feuler_kokkos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkestene%2Feuler_kokkos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkestene%2Feuler_kokkos/lists"}