Skip to content

Commit

Permalink
Squashed 'thirdParty/cupla/' changes from a96b293dc..4578ae151
Browse files Browse the repository at this point in the history
4578ae151 Merge pull request ComputationalRadiationPhysics#128 from psychocoderHPC/topic-updateAlpakaToCurrent0.4.0dev
0c090e536 Merge commit 'dd8afa5cec90a1398b8da3f9cd7d30aa59664cb5' into topic-updateAlpakaToCurrent0.4.0dev
dd8afa5ce Squashed 'alpaka/' changes from 0a2b6161..d5e59590
767768a88 rename alpaka queue names
8c227fbb6 Merge pull request ComputationalRadiationPhysics#130 from psychocoderHPC/fix-configHeaderTest
a6c3da536 fix `config header` test
a439c9d6b Merge pull request ComputationalRadiationPhysics#129 from psychocoderHPC/topic-updateTravisCMakeTo3.15.4
2e0daaf1b update tavis CMake to 3.15.4
04698e9c6 Merge pull request ComputationalRadiationPhysics#123 from SimeonEhrig/ci_enable_backends
25e64b623 time command add to ci test
c559bf432 Merge pull request ComputationalRadiationPhysics#107 from SimeonEhrig/init-gitlab-ci
488a2e95f Merge pull request ComputationalRadiationPhysics#117 from tdd11235813/pr-fixes-atomics
c2916be68 Adds atomicAnd, atomicXor, atomicOr.
7c330a5a9 Merge pull request ComputationalRadiationPhysics#112 from psychocoderHPC/topic-standaloneHeader
d84f2fdea configuration header
6a97c1cf1 Merge pull request ComputationalRadiationPhysics#113 from fwyzard/dev_cuplaGetErrorName
d210a37a0 Add cuplaGetErrorName with the same functionality as cuplaGetErrorString
d050bf3cd Merge pull request ComputationalRadiationPhysics#111 from tdd11235813/doc-subtree
19cf46913 Describes how to pull subtree as generic git author.
4ecc143f4 Merge pull request ComputationalRadiationPhysics#103 from tdd11235813/dev
16c806e68 Merge pull request ComputationalRadiationPhysics#104 from tdd11235813/dev-targets
43fd52319 Add gitlab-ci.yml for GitLab CI tests
fd37e7b7d Alpaka as git subtree instead of git submodule.
16b455107 Squashed 'alpaka/' content from commit 0a2b6161
69b79bd95 Merge commit '16b4551075f93cdd71309433b02936a152dfee9f' as 'alpaka'
fa5cc5260 Removes alpaka git module.
67485d510 Some stylistic changes.
4f2b9c019 CUPLA_ADD_EXECUTABLE links cupla target. Target provides c++11.

git-subtree-dir: thirdParty/cupla
git-subtree-split: 4578ae151ee6ac5c7810f76ff0c3a4506158807d
  • Loading branch information
Third Party authored and psychocoderHPC committed Oct 25, 2019
1 parent c98c0a0 commit 9c93042
Show file tree
Hide file tree
Showing 487 changed files with 91,278 additions and 163 deletions.
113 changes: 113 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
.base_job:
script:
# the default build type is Release
# if neccesary, you can rerun the pipeline with another build type-> https://docs.gitlab.com/ee/ci/pipelines.html#manually-executing-pipelines
# to change the build type, you must set the environment variable CUPLA_BUILD_TYPE
- if [[ ! -v CUPLA_BUILD_TYPE ]] ; then
CUPLA_BUILD_TYPE=Release ;
fi
- echo "number of processor threads $(nproc)"
- $CXX --version
- cmake --version
# print boost version
- echo -e "#include <boost/version.hpp>\n#include <iostream>\nint main() { std::cout << BOOST_VERSION << std::endl; return 0; }" | $CXX -x c++ - -o boost_version >/dev/null || { echo 0; }
- echo "Boost version $(./boost_version)"
- export cupla_DIR=$CI_PROJECT_DIR
# use one build directory for all build configurations
- mkdir build
- cd build
- echo "Build type-> $CUPLA_BUILD_TYPE"
# ALPAKA_ACCS contains the backends, which are used for each build
# the backends are set in the sepcialized base jobs .base_gcc,.base_clang and.base_cuda
- for CMAKE_FLAGS in $ALPAKA_ACCS ; do
echo "###################################################"
&& echo "# Example Matrix Multiplication (adapted original)"
&& echo "###################################################"
&& echo "can not run with CPU_B_SEQ_T_SEQ due to missing elements layer in original SDK example"
&& echo "CPU_B_SEQ_T_OMP2/THREADS too many threads necessary (256)"
&& if [[ $CMAKE_FLAGS =~ -*DALPAKA_ACC_GPU_CUDA_ENABLE=ON.* ]]; then
cmake $cupla_DIR/example/CUDASamples/matrixMul/ $CMAKE_FLAGS -DCMAKE_BUILD_TYPE=$CUPLA_BUILD_TYPE
&& make -j
&& time ./matrixMul -wA=64 -wB=64 -hA=64 -hB=64
&& rm -r * ;
fi
&& echo "###################################################"
&& echo "# Example Async API (adapted original)"
&& echo "###################################################"
&& echo "can not run with CPU_B_SEQ_T_SEQ due to missing elements layer in original SDK example"
&& echo "CPU_B_SEQ_T_OMP2/THREADS too many threads necessary (512)"
&& if [[ $CMAKE_FLAGS =~ -*DALPAKA_ACC_GPU_CUDA_ENABLE=ON.* ]]; then
cmake $cupla_DIR/example/CUDASamples/asyncAPI/ $CMAKE_FLAGS -DCMAKE_BUILD_TYPE=$CUPLA_BUILD_TYPE
&& make -j
&& time ./asyncAPI
&& rm -r * ;
fi
&& echo "###################################################"
&& echo "# Example Async API (added elements layer)"
&& echo "###################################################"
&& cmake $cupla_DIR/example/CUDASamples/asyncAPI_tuned/ $CMAKE_FLAGS -DCMAKE_BUILD_TYPE=$CUPLA_BUILD_TYPE
&& make -j
&& time ./asyncAPI_tuned
&& rm -r *
&& echo "###################################################"
&& echo "Example vectorAdd (added elements layer)"
&& echo "###################################################"
&& cmake $cupla_DIR/example/CUDASamples/vectorAdd/ $CMAKE_FLAGS -DCMAKE_BUILD_TYPE=$CUPLA_BUILD_TYPE
&& make -j
&& time ./vectorAdd 100000
&& rm -r * ;
done

.base_gcc:
variables:
GIT_SUBMODULE_STRATEGY: normal
CXX: g++
CC: gcc
ALPAKA_ACCS: "-DALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE=ON
-DALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE=ON
-DALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE=ON"
# -DALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE=ON
extends: .base_job
# x86_64 tag is used to get a multi-core CPU for the tests
tags:
- x86_64

.base_clang:
variables:
GIT_SUBMODULE_STRATEGY: normal
CXX: clang++
CC: clang
ALPAKA_ACCS: "-DALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE=ON
-DALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE=ON"
# -DALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE=ON
# -DALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE=ON
extends: .base_job
# x86_64 tag is used to get a multi-core CPU for the tests
tags:
- x86_64

.base_cuda:
variables:
GIT_SUBMODULE_STRATEGY: normal
CXX: g++
CC: gcc
ALPAKA_ACCS: "-DALPAKA_ACC_GPU_CUDA_ENABLE=ON"
before_script:
- nvidia-smi
- nvcc --version
extends: .base_job
tags:
- cuda
- intel

gcc7:
image: registry.gitlab.com/hzdr/cupla-docker/gcc7:latest
extends: .base_gcc

clang7:
image: registry.gitlab.com/hzdr/cupla-docker/clang7:latest
extends: .base_clang

cuda9:
image: registry.gitlab.com/hzdr/cupla-docker/cuda9:latest
extends: .base_cuda
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

19 changes: 12 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ before_install:
- mkdir -p $HOME/asyncAPI
- mkdir -p $HOME/asyncAPI_tuned
- mkdir -p $HOME/vectorAdd
- mkdir -p $HOME/test/config
- export CMAKE_FLAGS="-DALPAKA_ACC_"$STRATEGY"_ENABLE=ON"
- if [ "$COMPILER" == "gcc" ]; then
echo "Using g++-4.9 and sequential OpenMP2 threads ...";
Expand Down Expand Up @@ -66,15 +67,15 @@ install:
# CMAKE #
#############################################################################
- export PATH=$CMAKE_ROOT/bin:$PATH
- CMAKE_311_FOUND=$(cmake --version | grep " 3\.11\." >/dev/null && { echo 0; } || { echo 1; })
- if [ $CMAKE_311_FOUND -ne 0 ]; then
- CMAKE_315_FOUND=$(cmake --version | grep " 3\.15\." >/dev/null && { echo 0; } || { echo 1; })
- if [ $CMAKE_315_FOUND -ne 0 ]; then
mkdir -p $CMAKE_ROOT &&
cd $CMAKE_ROOT &&
rm -rf $CMAKE_ROOT/* &&
travis_retry wget --no-check-certificate http://cmake.org/files/v3.11/cmake-3.11.0-Linux-x86_64.tar.gz &&
tar -xzf cmake-3.11.0-Linux-x86_64.tar.gz &&
mv cmake-3.11.0-Linux-x86_64/* . &&
rm -rf cmake-3.11.0-Linux-x86_64.tar.gz cmake-3.11.0-Linux-x86_64 &&
travis_retry wget --no-check-certificate http://cmake.org/files/v3.15/cmake-3.15.4-Linux-x86_64.tar.gz &&
tar -xzf cmake-3.15.4-Linux-x86_64.tar.gz &&
mv cmake-3.15.4-Linux-x86_64/* . &&
rm -rf cmake-3.15.4-Linux-x86_64.tar.gz cmake-3.15.4-Linux-x86_64 &&
cd -;
fi
- cmake --version
Expand Down Expand Up @@ -155,5 +156,9 @@ script:
./vectorAdd 100000;
fi
#############################################################################
# Test: (To do: add tests in $TRAVIS_BUILD_DIR/test/ #
# Test: additional tests #
#############################################################################
- cd $HOME/test/config
- if [[ $CXX =~ "^g\+\+" ]] || [[ "$COMPILER" == "nvcc" ]] ; then
$TRAVIS_BUILD_DIR/test/system/config/test.sh $CXX;
fi
39 changes: 31 additions & 8 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,19 @@ Requirements
- `mkdir -p $HOME/src`
- `git clone git://github.com/ComputationalRadiationPhysics/cupla.git $HOME/src/cupla`
- `cd $HOME/src/cupla`
- `git submodule init`
- `git submodule update`
- `export CUPLA_ROOT=$HOME/src/cupla`
- use cupla without the submodule alpaka:
Set the advanced CMake variable `cupla_ALPAKA_PROVIDER` to `extern` and
- use a different alpaka installation:
set environment variable `ALPAKA_ROOT` or extend `CMAKE_PREFIX_PATH` with the
path to alpaka.


compile an example
-----------------

Compile an example
------------------

- create build directory `mkdir -p buildCuplaExample`
- `cd buildCuplaExample`
- `cmake $CUPLA_ROOT/example/CUDASamples/matrixMul -D<ACC_TYPE>=ON`
- list of supported ACC_TYPES
- list of supported `ACC_TYPE`s
- `ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE`
- `ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE`
- `ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE`
Expand All @@ -41,3 +38,29 @@ compile an example
see [TuningGuide.md](doc/TuningGuide.md)
- `make -j`
- `./matrixMul -wA=320 -wB=320 -hA=320 -hB=320` (parameters must be a multiple of 32!)


How to update alpaka as git subtree?
------------------------------------

```zsh
# git author is generic to not mess up contribution statistics
GIT_AUTHOR_NAME="Third Party" GIT_AUTHOR_EMAIL="[email protected]" \
git subtree pull --prefix alpaka \
https://github.com/ComputationalRadiationPhysics/alpaka.git develop --squash
```

**How to commit local changes to alpaka upstream?**

If your local alpaka version contains changes you want to contribute back upstream via fork, then you can use `git subtree push`:

```zsh
# Add your fork of alpaka to git remotes
git remote add alpaka-fork [email protected]:YOUR_NAME/alpaka.git

# Push your changes to your fork
git subtree push --prefix=alpaka alpaka-fork
```
Then check your github page of your fork to open a pull request upstream.

More information can be found in this [git subtree guide](https://www.atlassian.com/blog/git/alternatives-to-git-submodule-git-subtree).
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ Dependencies
------------

- **cmake 3.11.0**
- **alpaka**
- is loaded as `git submodule` within **cupla** (see [INSTALL.md](INSTALL.md))
- for more information please read [README.md](https://github.com/ComputationalRadiationPhysics/alpaka/blob/master/README.md)
- **[alpaka](https://github.com/ComputationalRadiationPhysics/alpaka/)**
- alpaka is loaded as `git subtree` within **cupla**, see [INSTALL.md](INSTALL.md)

Usage
-----
Expand All @@ -49,13 +48,15 @@ Usage
- Checkout the [tuning guide](doc/TuningGuide.md) for a step further to performance
portable code.

[cupla can be used as a header-only library and without the CMake build system](doc/ConfigurationHeader.md)

Authors
-------

### Maintainers and core developers

- Rene Widera
- Matthias Werner

### Former Members, Contributions and Thanks

Expand Down
1 change: 0 additions & 1 deletion alpaka
Submodule alpaka deleted from c922a1
1 change: 1 addition & 0 deletions alpaka/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
18 changes: 18 additions & 0 deletions alpaka/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/doc/doxygen/*
!/doc/doxygen/Doxyfile
!/doc/doxygen/alpaka_doxygen.png
/doc/latex/*
**/build

# tmp files
*~

# netbeans project files
/nbproject/

# Code::Blocks project files
/*.cbp
/*.layout

# original backup files
*.orig
Loading

0 comments on commit 9c93042

Please sign in to comment.