-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
119 changed files
with
4,066 additions
and
422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Deploy HTML slides to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: | ||
- "master" | ||
paths: | ||
- "*/docs/**" | ||
- ".github/workflows/pages.yml" | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
pages-html: | ||
uses: ./.github/workflows/pages.yml | ||
with: | ||
include_pdf: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Deploy HTML and PDF slides to Pages | ||
|
||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
pages-pdf: | ||
uses: ./.github/workflows/pages.yml | ||
with: | ||
include_pdf: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Script based on examples in https://github.com/actions/starter-workflows/tree/main/pages | ||
name: Deploy slides to Pages | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
include_pdf: | ||
required: true | ||
type: boolean | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build: | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/csc-training/slidefactory:3.1.0-beta.3 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v4 | ||
- name: Build slides | ||
env: | ||
INCLUDE_PDF: ${{ inputs.include_pdf }} | ||
run: | | ||
git config --global --add safe.directory $PWD | ||
GIT_SHORT_SHA=$(git rev-parse --short $GITHUB_SHA) | ||
GIT_DATE=$(git show -s --format=%ci $GITHUB_SHA) | ||
ARGS="" | ||
[[ "$INCLUDE_PDF" == "true" ]] && ARGS="--with-pdf" | ||
slidefactory pages about.yml build --info_content "Updated for [$GIT_SHORT_SHA]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/$GITHUB_SHA) ($GIT_DATE)" $ARGS | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./build | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
*.html | ||
*.sif | ||
build/ | ||
|
||
#ignore default binary name | ||
a.out | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file is used in the generation of the web page | ||
title: CSC Summer School in High-Performance Computing | ||
modules: | ||
- intro-to-hpc | ||
- computer-platforms | ||
- mpi | ||
- parallel-io | ||
- hybrid | ||
- gpu-openmp | ||
- gpu-hip | ||
- application-performance | ||
- application-design |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
## Exercieses | ||
## Exercises | ||
|
||
- [Continuous integration](ci/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This file is used in the generation of the web page | ||
title: Application Design | ||
slidesdir: docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This file is used in the generation of the web page | ||
title: Application Performance | ||
slidesdir: docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include<stdlib.h> | ||
#include<stdio.h> | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
printf("Hello, world!\n"); | ||
return EXIT_SUCCESS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
.PHONY: clean all install | ||
|
||
%.o: %.c | ||
$(CC) $(CFLAGS) -c $< -o $@ | ||
|
||
hello: hello.o module.o | ||
|
||
clean: | ||
rm *.o hello | ||
|
||
install: hello | ||
mkdir -p ./bin/ | ||
cp hello ./bin/ | ||
|
||
all: hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include<stdlib.h> | ||
|
||
void hello(); | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
hello(); | ||
return EXIT_SUCCESS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include<stdio.h> | ||
void hello() | ||
{ | ||
printf("Hello, world!\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Makes cmake act like its version 3.18 (this is a comment) | ||
cmake_minimum_required(VERSION 3.18) | ||
|
||
project(project_hello VERSION 0.1 DESCRIPTION "Hello project" LANGUAGES C) | ||
|
||
set(BUILDER_NAME "Default" CACHE STRING "Variable description") | ||
|
||
configure_file ( | ||
"${PROJECT_SOURCE_DIR}/include/config.h.in" | ||
"${PROJECT_BINARY_DIR}/include/config.h") | ||
|
||
add_library(module STATIC module.c) | ||
target_include_directories(module PUBLIC include) | ||
|
||
add_executable(hello hello.c) | ||
target_include_directories(hello PUBLIC include ${PROJECT_BINARY_DIR}/include) | ||
|
||
target_link_libraries(hello PUBLIC module) | ||
|
||
install(TARGETS hello module | ||
RUNTIME DESTINATION "bin" | ||
ARCHIVE DESTINATION "lib" | ||
LIBRARY DESTINATION "LIB") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include<stdlib.h> | ||
#include<stdio.h> | ||
#include"config.h" | ||
#include"module.h" | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
printf("Hello version %i.%i\nBuilt by %s\n", | ||
HELLO_VERSION_MAJOR, | ||
HELLO_VERSION_MINOR, | ||
HELLO_BUILDER_NAME); | ||
hello(); | ||
return EXIT_SUCCESS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#define HELLO_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ | ||
#define HELLO_VERSION_MINOR @PROJECT_VERSION_MINOR@ | ||
#define HELLO_VERSION @PROJECT_VERSION@ | ||
|
||
#define HELLO_BUILDER_NAME "@BUILDER_NAME@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
|
||
void hello(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include<stdio.h> | ||
#include"module.h" | ||
|
||
const char *message = "Hello, world!\n"; | ||
|
||
void hello() | ||
{ | ||
printf("%s", message); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
cmake_minimum_required(VERSION 3.18) | ||
|
||
project(something_kokkos VERSION 0.1 DESCRIPTION "Computes something with kokkos" LANGUAGES C CXX) | ||
|
||
|
||
# Search internet for "cmake kokkos find_package" | ||
set(Kokkos_ROOT "/home/jkataja/opt/kokkos/4.2.01" CACHE PATH "Where to find kokkos") | ||
set(Kokkos_DIR "${Kokkos_ROOT}" CACHE PATH "kokkos_DIR" FORCE) # Non cache variable! | ||
# set(Kokkos_DIR "/home/jkataja/opt/kokkos/4.2.01" CACHE PATH "Kokkos" directory) | ||
find_package(Kokkos REQUIRED) | ||
|
||
set(CMAKE_EXPORT_COMPILE_COMMANDS true) | ||
|
||
add_executable(something reduce.cpp) | ||
target_link_libraries(something Kokkos::kokkos) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <Kokkos_Core.hpp> | ||
#include <iostream> | ||
#include <iomanip> | ||
|
||
constexpr size_t N = 10000; | ||
typedef float numtype; | ||
|
||
int main(int argc, char* argv[]) { | ||
Kokkos::initialize(argc, argv); | ||
{ | ||
numtype sum=0; | ||
Kokkos::parallel_reduce(N+1, KOKKOS_LAMBDA(const int i, numtype &lsum) { | ||
lsum += 1.0*i; | ||
}, Kokkos::Sum<numtype>(sum)); | ||
Kokkos::fence(); | ||
|
||
std::cout << "reduction sum is " << std::setprecision(18) | ||
<< sum << std::endl; | ||
std::cout << "error to exact is " << std::setprecision(18) | ||
<< (N*(1+N) - sum*2)/2 << std::endl << "... or is it?\n"; | ||
} | ||
Kokkos::finalize(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
cmake_minimum_required(VERSION 3.18) | ||
|
||
project(heat VERSION 1.0 DESCRIPTION "Heat equation w/ cmake" LANGUAGES CXX C) | ||
find_package(OpenMP) | ||
find_package(PNG REQUIRED) | ||
|
||
add_executable(heat_omp core.cpp heat.cpp main.cpp | ||
setup.cpp utilities.cpp io.cpp "../../../hybrid/heat-hybrid/common/pngwriter.c") | ||
target_link_libraries(heat_omp PRIVATE png) | ||
target_include_directories(heat_omp PUBLIC "../../../hybrid/heat-hybrid/common") | ||
|
||
if(OpenMP_CXX_FOUND) | ||
target_link_libraries(heat_omp PUBLIC OpenMP::OpenMP_CXX) | ||
endif() | ||
|
||
|
||
install(TARGETS heat_omp RUNTIME DESTINATION "heat" ) | ||
install(FILES "bottle.dat" DESTINATION "heat") |
Oops, something went wrong.