-
Notifications
You must be signed in to change notification settings - Fork 34
Building FleCSI with Kokkos Support (Legion Kokkos CUDA)
Irina Demeshko edited this page Nov 26, 2019
·
2 revisions
git clone —recursive https://github.com/kokkos/kokkos.git
git checkout -b develop origin/develop
mkdir build
cd build
CC=clang CXX=clang++ ccmake -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} --gcc-toolchain=set_path_to_your_gcc_build -static-libstdc++ -D__STRICT_ANSI__ -fPIC " -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} --gcc-toolchain=set_path_to_your_gcc_build -static-libstdc++ -D__STRICT_ANSI__ -fPIC " .. -DCMAKE_INSTALL_PREFIX=/your/install/path -DCMAKE_BUILD_TYPE=Debug -DKokkos_ENABLE_CUDA=ON -DKokkos_ENABLE_CUDA_LAMBDA=ON -DKokkos_ENABLE_DEBUG=ON -DKokkos_ENABLE_SERIAL=ON -DKOKKOS_CXX_COMPILER_ID=Clang -DKokkos_ARCH=Power9 -DKokkos_ARCH_VOLTA70=ON -DKokkos_ENABLE_CUDA_UVM=OFF -DKokkos_CXX_STANDART=11
make
make install
If needed, set CMAKE_PREFIX_PATH
to point to correct Kokkos install
git clone —recursive https://github.com/laristra/flecsi-third-party.git
cd flecsi-third-party
git checkout -b irina/kokkos origin/irina/kokkos
git submodule update --recursive
mkdir build
cd build
CC=clang CXX=clang++ ccmake -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} --gcc-toolchain=set_path_to_your_gcc_build -static-libstdc++ -D__STRICT_ANSI__ -std=c++11" -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} --gcc-toolchain=set_path_to_your_gcc_build -static-libstdc++ -D__STRICT_ANSI__" .. -DCMAKE_INSTALL_PREFIX=/your/install/path -DCMAKE_BUILD_TYPE=Debug -DLEGION_USE_KOKKOS=ON
make
make install
git clone --recursive https://github.com/laristra/flecsi.git
mkdir build
cd build
../arch/developer-clang legion kokkos
make
There is kokkos_test unit test (https://github.com/laristra/flecsi/blob/master/flecsi/execution/test/kokkos.cc) that can be used as an example of how to use kokkos in FleCSI
you can execute it like:
cd build
cd test/execution
./kokkos_test -ll:gpu 1