Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/kokkos #15

Open
wants to merge 98 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
6c05fa3
test commit
thomas-saigre Jan 20, 2025
adaa9f4
fix warning and error at compilation of the site
thomas-saigre Jan 21, 2025
38483be
up kokkos installation process
thomas-saigre Jan 21, 2025
54eed2f
update why Kokkos part
lemoinep Jan 21, 2025
8777d7e
fix image problem
lemoinep Jan 21, 2025
a869a2e
up views part
lemoinep Jan 21, 2025
debc0a4
up views part
lemoinep Jan 21, 2025
e3c07c3
up memory space part
lemoinep Jan 21, 2025
110da5c
up memory space part
lemoinep Jan 21, 2025
7c5ce15
set-up compilation for kokkos examples
thomas-saigre Jan 21, 2025
ab0a8c0
up more content about views
thomas-saigre Jan 21, 2025
bb596b2
Merge remote-tracking branch 'origin/feature/kokkos' into feature/kokkos
thomas-saigre Jan 21, 2025
cd96ed3
refactor page and example
thomas-saigre Jan 21, 2025
1c2ba87
add link in memory_spaces
lemoinep Jan 22, 2025
c7f2080
up execution-spaces part and pictures
lemoinep Jan 22, 2025
e715308
up ex04
thomas-saigre Jan 22, 2025
82c60df
update why-kokkos part
lemoinep Jan 22, 2025
ce3bf97
update memory-spaces part
lemoinep Jan 22, 2025
940cc7d
load kokkos with spack #14
thomas-saigre Jan 22, 2025
47cb3f9
c++ term correction in adoc files
lemoinep Jan 23, 2025
c1a9130
c++ term correction in adoc files
lemoinep Jan 23, 2025
c242d53
added summary part at the end of memory space and execution
lemoinep Jan 23, 2025
0dcc7d7
tiny fixes
thomas-saigre Jan 23, 2025
1590247
Merge branch 'feature/kokkos' of https://github.com/feelpp/course-par…
thomas-saigre Jan 23, 2025
43980a6
add memory-access-patterns and picture
lemoinep Jan 23, 2025
64d5929
updat mememory-access-patterns part
lemoinep Jan 23, 2025
bf22fa9
load spakc environnement with kokkos
thomas-saigre Jan 23, 2025
70b70b1
fix: correct spack environment activation command in CI workflow
thomas-saigre Jan 23, 2025
3afcaf4
add advanced-reductions
lemoinep Jan 23, 2025
fa4e21c
Merge branch 'feature/kokkos' of https://github.com/feelpp/course-par…
thomas-saigre Jan 23, 2025
f63b9ae
update design adoc
lemoinep Jan 23, 2025
5199a9b
Merge branch 'feature/kokkos' of https://github.com/feelpp/course-par…
thomas-saigre Jan 23, 2025
76bd629
up mirrors page
thomas-saigre Jan 23, 2025
b69612e
tiny fix display of code
thomas-saigre Jan 23, 2025
b13fb95
up code [NOT COMPILING] of feel++ and kokkos
thomas-saigre Jan 23, 2025
8e23fcf
multidimensional loops and data structure part and picture
lemoinep Jan 23, 2025
f8720c5
update design
lemoinep Jan 23, 2025
a6d004d
update hierarchical-parallelism
lemoinep Jan 24, 2025
332e8b0
update mpi-pgas part
lemoinep Jan 24, 2025
f0352a7
update
lemoinep Jan 27, 2025
7550739
move bloc example in execution-spaces
lemoinep Jan 27, 2025
0d00b0e
update introduction parallel programming
lemoinep Jan 27, 2025
db41578
add new folder and documentations
lemoinep Jan 27, 2025
c515ed8
add asynchronicity and stream part
lemoinep Jan 27, 2025
0e9767b
add page for compilation of gaya
thomas-saigre Jan 28, 2025
75f3595
Merge branch 'feature/kokkos' of https://github.com/feelpp/course-par…
thomas-saigre Jan 28, 2025
04a3d61
update introduction add DPU part
lemoinep Jan 28, 2025
ba1c74c
update specx part
lemoinep Jan 28, 2025
9dc6eb2
up example of code with mirrors [ci skip]
thomas-saigre Jan 28, 2025
7392e8e
test
lemoinep Jan 29, 2025
e81ea2a
add cholesky kokkos test
lemoinep Jan 30, 2025
9a673c3
add memspace kokkos test
lemoinep Jan 30, 2025
85ede19
add simple multi-gpus kokkos test
lemoinep Jan 30, 2025
ae8144c
update index part
lemoinep Jan 30, 2025
2598c7a
add prog demo execution patterns
lemoinep Jan 30, 2025
1d75526
modification ciyml v3 to v4
lemoinep Jan 31, 2025
926a614
update execution spaces policies part
lemoinep Jan 31, 2025
d9bbbf7
add execution patterns policies prog in src
lemoinep Jan 31, 2025
a8f6b4e
add dual view prog demo and updtate Multidimentional Loops part
lemoinep Jan 31, 2025
a77dcef
add prog demo SIMD update mpi-pas part and update single instruction …
lemoinep Jan 31, 2025
7cccd4b
update streams part
lemoinep Jan 31, 2025
f32fa99
add prog demo polynom Jacobi and add new logo and update wy kokkos part
lemoinep Jan 31, 2025
8385c0b
test compile feelpp_kokkos.cpp on CI
thomas-saigre Feb 3, 2025
76641c1
add fille MPI and PGAS and update ci Test
lemoinep Feb 3, 2025
4453fea
error installation PETSc and SLECs rollback installation
lemoinep Feb 3, 2025
7f99c36
add source command line for gaya
thomas-saigre Feb 3, 2025
ce7ae0b
load antora extensions
thomas-saigre Feb 4, 2025
546fbf8
up
lemoinep Feb 4, 2025
6a875b6
up
lemoinep Feb 4, 2025
e105d37
up
lemoinep Feb 5, 2025
9a00fc5
up
lemoinep Feb 5, 2025
a3e6172
up
lemoinep Feb 5, 2025
830364a
up
lemoinep Feb 6, 2025
b484119
update all without update cpp-dynamic-processor-collapsible
lemoinep Feb 6, 2025
3db80ba
update menu
lemoinep Feb 6, 2025
2e57416
add CMakeLists (nb : Kokkkos code is not compiled yet)
thomas-saigre Feb 6, 2025
beb9ea4
add files Kokkos demo
lemoinep Feb 10, 2025
7b94fe5
Format CPP files
lemoinep Feb 10, 2025
9f182dd
add code kokkos stream asynchronicity
lemoinep Feb 10, 2025
b58aac7
add coding folder and MCQ Kokkos
lemoinep Feb 10, 2025
da4402b
Update MCQ 001
lemoinep Feb 10, 2025
5f793d9
Add MCQ 2 3 4
lemoinep Feb 10, 2025
67f202c
enable feelpp extension
thomas-saigre Feb 10, 2025
92fe327
Add MCQ 5 6 7
lemoinep Feb 10, 2025
b3a6144
tiny display fixes [ci skip]
thomas-saigre Feb 10, 2025
6950a62
fix qcm codes
thomas-saigre Feb 11, 2025
e9b3cef
improve display
thomas-saigre Feb 11, 2025
2ed1579
load spack
thomas-saigre Feb 11, 2025
42a5da7
update CI workflow to use self-hosted Ubuntu 22.04 for documentation …
thomas-saigre Feb 11, 2025
0865932
fix: update spack activation command in CI workflow
thomas-saigre Feb 12, 2025
88994c8
add prog mpi multi-gpu kokkos
lemoinep Feb 12, 2025
33b3b6d
rename file
lemoinep Feb 12, 2025
1dae777
up
lemoinep Feb 12, 2025
eb06625
add prog multi-gpu and mpi-multi-gpu hip
lemoinep Feb 12, 2025
e20cec6
add program that exchanges information between GPUs via MPI
lemoinep Feb 12, 2025
eef3c7a
add more examples in hoerarchical-parallel
thomas-saigre Feb 14, 2025
3f99cf7
add code
thomas-saigre Feb 14, 2025
abd6fe5
Merge branch 'feature/kokkos' of github.com:feelpp/parallel-programmi…
thomas-saigre Feb 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 25 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: CI

on:
on:
push:
branches:
branches:
- '**' # Push events on all branches
paths-ignore:
- '.github/workflows/init.yml'
Expand All @@ -12,17 +12,23 @@ on:
jobs:

build_docs:
runs-on: ubuntu-22.04
runs-on: self-ubuntu-22.04
name: Build, Install, Package documentation
if: "!contains(github.event.head_commit.message, 'docs skip')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install credentials
run: echo https://$GITHUB_OAUTH:@github.com > $HOME/.git-credentials
env:
GITHUB_OAUTH: ${{ secrets.CR_PAT_WORKFLOW }}
- name: Build
run: |
if [ -f /data/cemosis/spack/share/spack/setup-env.sh ]; then
source /data/cemosis/spack/share/spack/setup-env.sh
spack env activate feelpp
else
echo "Spack environment setup script not found."
fi
npm install
npm run antora
working-directory: docs
Expand All @@ -40,29 +46,30 @@ jobs:
if: "!contains(github.event.head_commit.message, 'code skip')"
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: true
recursive: true
-
name: Build
-
name: Build
run: |
spack env activate feelpp-openmpi4-kokkos
cmake --preset default
cmake --build --preset default
-
name: Check
-
name: Check
run: |
echo "not yet enabled, need to add tests"
# ctest --preset default
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
-
-
name: Package
run: |
cmake --build --preset default -t package
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
# Artifact name
name: parallel-programming-artifacts
Expand All @@ -89,8 +96,8 @@ jobs:
with:
lfs: true
submodules: 'recursive'
- name: Download
uses: actions/download-artifact@v3
- name: Download
uses: actions/download-artifact@v4
with:
# Artifact name
name: parallel-programming-artifacts
Expand All @@ -113,20 +120,20 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
-
-
name: Build container image
uses: docker/build-push-action@v4
with:
with:
context: artifacts
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ./Dockerfile

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,10 @@ jupyter/
auto-save-list
tramp
.\#*
_minted*
*.aux
*.log
*.synctex.gz
*.fls
/cpp/
/cpp.old/
106 changes: 105 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,108 @@
{
"C_Cpp.default.configurationProvider": "vector-of-bool.cmake-tools",
"cmake.buildDirectory": "${workspaceFolder}/build-${variant:buildType}"
"cmake.buildDirectory": "${workspaceFolder}/build-${variant:buildType}",
"files.associations": {
"*.json": "jsonc",
"*.dat": "csv (whitespace)",
"*.pgf": "tex",
"*.pdf_tex": "tex",
".py.in": "Python",
"*.tikz": "tex",
"*.slurm": "shellscript",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"csetjmp": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"hash_map": "cpp",
"strstream": "cpp",
"barrier": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"cfenv": "cpp",
"charconv": "cpp",
"chrono": "cpp",
"cinttypes": "cpp",
"codecvt": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"coroutine": "cpp",
"cstdint": "cpp",
"cuchar": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"regex": "cpp",
"source_location": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"hash_set": "cpp",
"slist": "cpp",
"fstream": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"latch": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"ranges": "cpp",
"scoped_allocator": "cpp",
"semaphore": "cpp",
"shared_mutex": "cpp",
"span": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"syncstream": "cpp",
"thread": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"valarray": "cpp",
"variant": "cpp",
"expected": "cpp",
"spanstream": "cpp",
"stacktrace": "cpp",
"format": "cpp",
"__nullptr": "cpp"
}
}
7 changes: 7 additions & 0 deletions course-parallel-programming.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"folders": [
{
"path": "."
}
]
}
8 changes: 5 additions & 3 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ if ( NPM_EXECUTABLE )

add_custom_command(OUTPUT "${ANTORA_OUTPUT_DIR}" ALL
COMMENT "Building documentation... "
COMMAND "${npm}" install
COMMAND "${npm}" run antora
COMMAND "${npm}" install
COMMAND "${npm}" run antora
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
if ( NOT TARGET doc )
Expand All @@ -21,4 +21,6 @@ endif()
install(DIRECTORY "${ANTORA_OUTPUT_DIR}/" DESTINATION ${APPLICATION_DOC_DIR} OPTIONAL)
else()
message(STATUS "npm is not installed, can use antora ")
endif()
endif()

add_subdirectory( modules/kokkos/examples/src )
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ext:
base: modules/ROOT/attachments/
- run:
command: |
./generate-jupyter.sh docs/modules/exos
./generate-jupyter.sh docs/modules
scan:
dir: jupyter/exos/
files: '**/*.ipynb'
Expand Down
Binary file added docs/modules/ROOT/assets/images/kokkos1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/modules/ROOT/assets/images/kokkos1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/CUDA_Coding.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

image::CUDA_Logo.png[Img401,50,50,role="left"]

* Compiling a program for CUDA
* Compiling a program for CUDA
*** For example, to compile MyProg.cu you would use a command like
*** nvcc -o MyProg MyProg.cu

Expand Down
26 changes: 8 additions & 18 deletions docs/modules/ROOT/pages/HEAT_Coding.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@



.Heat equation in 2D
[.examp]
****
== Heat equation in 2D

* Theory
=== Theory

Heat (or diffusion) equation is a partial differential equation that describes the variation of temperature in a given region over time

Expand Down Expand Up @@ -42,17 +40,17 @@ u^{m+1}(i,j) = u^m(i,j) + \Delta t \alpha \nabla^2 u^m(i,j)

Note: The algorithm is stable only when

[stem]
++++
\begin{align*}
\Delta t < \frac{1}{2 \alpha} \frac{(\Delta x \Delta y)^2}{(\Delta x)^2 (\Delta y)^2}
\end{align*}
++++

****


== Code

.Code
[.examp]
****
The solver carries out the time development of the 2D heat equation over the number of time steps provided by the user. The default geometry is a flat
rectangle (with grid size provided by the user), but other shapes may be used via input files. The program will produce an image (PNG) of the temperature field after every 100 iterations.

Expand All @@ -74,18 +72,10 @@ include::ROOT:example$src/Heat_Equation_ParallelPrograming_Comparison/MPI_OpenMP
----
include::ROOT:example$src/Heat_Equation_ParallelPrograming_Comparison/Cuda/core_cuda.cu[indent=0]
----
****

.*Performance*
****
.*Performance*
ADD SOME RESULTS
****







...

...
1 change: 0 additions & 1 deletion docs/modules/ROOT/pages/HIP_Coding.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ include::ROOT:example$src/HIP/Matrix_Summation/03_matrix_summation_GPU_2D2D_2D1D



****
.*Profiling Performance*
****
ADD SOME RESULTS
Expand Down
Loading
Loading