Giter Club home page Giter Club logo

euler2d_kokkos's Introduction

Build Status

C/C++ CI

blast2d_1024x1536

This miniapp solves the compressible fluid dynamics (Euler) equations using 2D cartesian grids, parallelized for shared memory system. The full application for 2D/3D grids with MPI and Kokkos is available here : https://github.com/pkestene/euler_kokkos

Get the source

Our miniApp uses kokkos as a git submodule, configured to use the develop branch of kokkos. In order to download the sources all-in-one (miniApp + kokkos):

git clone [email protected]:pkestene/euler2d_kokkos.git

Build

We strongly recommend the out-of-source build, so that one can have one build directory per architecture.

If you already have Kokkos installed

Just 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.

mkdir -p build; cd build
cmake -DEULER2D_KOKKOS_BUILD=OFF ..
make

You should now have executable euler2d. You can run a simply implode test like this

cd src
./euler2d ./test_implode.ini

Kokkos is not already installed => build for Kokkos/OpenMP

To build for Kokkos/OpenMP backend (which is the default backend):

mkdir -p build/openmp; cd build/openmp
cmake -DEULER2D_KOKKOS_BUILD=ON -DEULER2D_KOKKOS_BACKEND=OpenMP ../..
make

You should now have executable euler2d. You can run a simply implode test like this

cd src
./euler2d ./test_implode.ini

Optionally, you can (recommended) activate HWLOC support by turning ON the flag Kokkos_ENABLE_HWLOC.

Kokkos is not already installed => build for Kokkos/CUDA

Obviously, you need to have Nvidia/CUDA driver and toolkit installed on your platform.

Example configuration:

mkdir build/cuda; cd build/cuda
cmake -DEULER2D_KOKKOS_BUILD=ON -DEULER2D_KOKKOS_BACKEND=Cuda -DKokkos_ENABLE_CUDA_LAMBDA=ON -DKokkos_ENABLE_HWLOC=ON ../..
make

Be aware that, kokkos will not use Nvidia compiler nvcc directly, but will use a wrapper instead (located in Kokkos source directory).

then make should give you a working executable euler2d running on GPU.

cd src
./euler2d ./test_implode.ini

euler2d_kokkos's People

Contributors

pkestene avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.