项目作者: pkestene

项目描述 :
Compute Mandelbrot Set using adaptive mesh refinement
高级语言: C++
项目地址: git://github.com/pkestene/AMR_mandelbrot.git
创建时间: 2019-03-17T20:41:49Z
项目社区:https://github.com/pkestene/AMR_mandelbrot

开源协议:GNU General Public License v3.0

下载


AMR_mandelbrot

Compute Mandelbrot Set using adaptive mesh refinement technique and C++/kokkos library for multi-architecture execution.
This is not intended to be efficient computation, but just a simple illustrative example of use of class Kokkos::UnorderedMap container (multi-architecture hash map data container). Mandelbrot set is computed iteratively, refined cells are inserted into the hashmap based data structure.

The following source code is self-contained; C++/kokkos library sources are included as a git submodule.

Example of Mandelbrot set with level_min=6 and level_max=11

  1. ./compute_mandelbrot_amr 6 11

mandelbrot set

How to build ?

Get the sources

  1. git clone git@github.com:pkestene/AMR_mandelbrot.git

How to build ?

Build for Kokkos/OpenMP target device

To build kokkos/OpenMP backend

  1. mkdir -p _build/openmp; cd _build/openmp
  2. cmake -DAMR_MANDELBROT_KOKKOS_BUILD=ON -DAMR_MANDELBROT_KOKKOS_BACKEND=OpenMP ../..
  3. make
  4. # run application
  5. ./compute_mandelbrot_amr 6 11

Optionally, you can (recommended) activate HWLOC support by using the flag -DKOKKOS_ENABLE_HWLOC=ON.

Build for Kokkos/Cuda target device

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

  1. # example build for cuda
  2. mkdir -p _build/cuda; cd _build/cuda
  3. cmake -DAMR_MANDELBROT_KOKKOS_BUILD=ON -DAMR_MANDELBROT_KOKKOS_BACKEND=Cuda -DKokkos_ENABLE_CUDA_LAMBDA=ON -DKokkos_ENABLE_HWLOC=ON ../..
  4. make
  5. # run application
  6. ./compute_mandelbrot_amr 6 11