Giter VIP home page Giter VIP logo

kokkos's Introduction

Acoustic_kokkos

Download this app

git clone --recursive https://github.com/wangyf/acoustic_kokkos

How to build ?

Requirement

  • cmake version 3.16

  • note: if you are on a fairly recent OS (ex: Ubuntu 21.10, or any OS using glibc >= 2.34), you may need to turn off linking with libdl when using kokkos/cuda backend. See this issue, as nvcc (even version 11.6) apparently doesn't seem to handle empty file /usr/lib/x86_64-linux-gnu/libdl.a (stub, libdl is integrated into glibc). Hopefully this will be solved in an upcoming cuda release.

# run this to know your glibc version
ldd --version

Data Preparation

  1. In build_xxx, create directories: in/ and out/
  2. Copy the input velocity structure (heterogeneous) into the in/
  3. All output .csv will be stored in out/

Build with target device OpenMP

mkdir build_openmp
cd build_openmp
CXX=YOUR_COMPILER_HERE cmake -DKokkos_ENABLE_OPENMP=ON ..
make
# then you can run the application
./src/acoustic_kokkos.openmp

Optionnally you can enable HWLOC by passing -DKokkos_ENABLE_HWLOC=ON on cmake's command line (or in ccmake curse gui).

Build with target device CUDA

CMake and Kokkos will set the compiler to nvcc_wrapper (located in kokkos sources, cloned as git submodule).

mkdir build_cuda
cd build_cuda
cmake -DKokkos_ENABLE_CUDA=ON -DKokkos_ENABLE_CUDA_LAMBDA=ON -DKokkos_ARCH_MAXWELL50=ON ..
make
# then you can run the application as before
./src/acoustic_kokkos.cuda

Of course, you will need to adapt variable Kokkos_ARCH to your actual GPU architecture (use cuda sample device_query to probe the architecture).

Depending on your OS, you may need to set variable Kokkos_CUDA_DIR to point to your CUDA SDK (if cmake is not able to figure out by itself); e.g. /usr/local/cuda-9.0

Build with target device HIP (AMD GPU)

CMake and Kokkos will set the compiler to hipcc (located in kokkos sources, cloned as git submodule).

Example:

mkdir build_hip
cd build_hip
cmake -DKokkos_ENABLE_HIP=ON -DKokkos_ARCH_VEGA908=ON ..
make
# then you can run the application as before
./src/acoustic_kokkos.hip

Example complish options:

Please read compile.sh

Animation example

Example

Kokkos

kokkos's People

Contributors

renawuq avatar

Watchers

 avatar

Forkers

wangyf

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.