Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KiT-RT
KiT-RT
Commits
93a5acf6
Commit
93a5acf6
authored
Nov 20, 2020
by
jannick.wolters
Browse files
CI improvements
Former-commit-id:
bb6087f6
parent
d59375de
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
93a5acf6
...
...
@@ -5,24 +5,27 @@ stages:
unit_tests
:
stage
:
unit_tests
variables
:
CTEST_OUTPUT_ON_FAILURE
:
"
TRUE"
script
:
-
git submodule update --init --recursive
-
cd code/build/release
-
cmake -G Ninja -DCMAKE_BUILD_TYPE=
Release
../../
-
cmake -G Ninja -DCMAKE_BUILD_TYPE=
Debug
../../
-
ninja
-
ninja test
timeout
:
2h
only
:
refs
:
-
develop
-
master
-
merge_requests
changes
:
-
"
code/include/**/*"
-
"
code/tests/**/*"
-
"
code/src/**/*"
-
"
code/CMakeLists.txt"
-
"
scripts/Dockerfile"
-
"
.gitmodules"
-
OMP_NUM_THREADS=1 ./unit_tests -r junit > unit_tests_report.xml
-
gcovr -e ../../ext/ -e ../../tests/ -r ../../
artifacts
:
when
:
always
paths
:
-
code/build/release/unit_tests_report.xml
reports
:
junit
:
code/build/release/unit_tests_report.xml
timeout
:
4h
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "develop"
changes
:
-
"
code/include/**/*"
-
"
code/tests/**/*"
-
"
code/src/**/*"
-
"
code/CMakeLists.txt"
-
"
scripts/Dockerfile"
-
"
.gitmodules"
-
if
:
$CI_PIPELINE_SOURCE == "web"
README.md
View file @
93a5acf6
[

](https://git.scc.kit.edu/rtsn/rtsn/-/commits/master)
[

](https://git.scc.kit.edu/rtsn/rtsn/-/commits/master)
# KiT-RT - an HPC Radio Therapy $`S_n`$ framework
TBD
## What KiT-RT is capable of
...
...
@@ -52,17 +54,17 @@ The resulting executable will automatically be placed in the `code/bin` folder.
## Run
### Local
Execute the compiled binary and hand over a valid
*TOML*
-styled config file.
Execute the compiled binary
from the
`bin`
folder
and hand over a valid
*TOML*
-styled config file.
Example from inside the
`code`
directory:
```
bash
./
bin/
KiT-RT input/example.cfg
./KiT-RT
../
input/example.cfg
```
In order to run the code in parallel execute:
```
bash
OMP_NUM_THREADS
=
N mpirun
-np
J ./
bin/
KiT-RT input/example.cfg
OMP_NUM_THREADS
=
N mpirun
-np
J ./KiT-RT
../
input/example.cfg
```
with
`N`
equal to the number of shared memory threads and
`J`
equal to the number of distrubuted memory threads.
...
...
code/CMakeLists.txt
View file @
93a5acf6
...
...
@@ -12,6 +12,8 @@ set( KITRT_DEBUG_OPTIONS -Wall -Wextra -Wpedantic )
### LIBRARIES ###################################
set
(
CMAKE_MODULE_PATH
${
PROJECT_SOURCE_DIR
}
/cmake
)
find_package
(
OpenMP REQUIRED
)
find_package
(
MPI REQUIRED
)
...
...
@@ -38,7 +40,7 @@ else()
message
(
STATUS
"Blaze: BLAS mode disabled"
)
add_compile_definitions
(
BLAZE_BLAS_MODE=0
)
endif
()
include
(
${
CMAKE_SOURCE_DIR
}
/cmake/
blaze-cache-config
.cmake
)
include
(
blaze-cache-config
)
include_directories
(
${
CMAKE_SOURCE_DIR
}
/ext/blaze
)
add_compile_definitions
(
METIS_EXPORT=
)
...
...
@@ -81,6 +83,7 @@ target_compile_options( ${CMAKE_PROJECT_NAME} PUBLIC "$<$<CONFIG:RELEASE>:${KITR
### BUILD UNIT TESTS ############################
include
(
CTest
)
set
(
CATCH_INCLUDE_DIR
${
CMAKE_SOURCE_DIR
}
/ext/Catch2/single_include/catch2
)
add_compile_definitions
(
BUILD_TESTING
)
add_compile_definitions
(
TESTS_PATH=
"
${
CMAKE_SOURCE_DIR
}
/tests/"
)
add_library
(
Catch INTERFACE
)
target_include_directories
(
Catch INTERFACE
${
CATCH_INCLUDE_DIR
}
)
...
...
@@ -89,6 +92,11 @@ list( REMOVE_ITEM SRCS "src/main.cpp" )
add_executable
(
unit_tests
${
TEST_SRCS
}
${
SRCS
}
${
EXT_SRCS
}
)
target_link_libraries
(
unit_tests Catch
${
CORE_LIBRARIES
}
)
target_compile_options
(
unit_tests PUBLIC
"$<$<CONFIG:DEBUG>:
${
KITRT_DEBUG_OPTIONS
}
>"
)
if
(
CMAKE_COMPILER_IS_GNUCXX
)
set
(
CODE_COVERAGE_OPTIONS --coverage -g -O0 -w
)
target_compile_options
(
unit_tests PUBLIC
"$<$<CONFIG:DEBUG>:
${
CODE_COVERAGE_OPTIONS
}
>"
)
target_link_libraries
(
unit_tests Catch gcov
)
endif
()
target_compile_options
(
unit_tests PUBLIC
"$<$<CONFIG:RELWITHDEBINFO>:
${
KITRT_RELWITHDEBINFO_OPTIONS
}
>"
)
target_compile_options
(
unit_tests PUBLIC
"$<$<CONFIG:RELEASE>:
${
KITRT_RELEASE_OPTIONS
}
>"
)
add_test
(
NAME unit_tests COMMAND unit_tests
)
...
...
scripts/Dockerfile
View file @
93a5acf6
FROM
ubuntu:20.04
ENV
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
ENV
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" \
PYTHONPATH=/usr/local/gmsh/lib:$PYTHONPATH \
PATH=/usr/local/gmsh/bin:$PATH
RUN
apt-get update
\
&&
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-qq
\
...
...
@@ -19,14 +21,24 @@ RUN apt-get update \
libssl-dev
\
libxt-dev
\
libgl1-mesa-dev
\
libglu1
\
libxrender1
\
libxcursor-dev
\
libxft-dev
\
libxinerama-dev
\
python3
\
python3-pip
\
gmsh
\
&&
apt-get clean
\
&&
apt-get autoremove
--purge
\
&&
rm
-rf
/var/lib/apt/lists/
*
RUN
wget
--no-check-certificate
--quiet
https://www.vtk.org/files/release/8.2/VTK-8.2.0.tar.gz
\
RUN
cd
/usr/local
\
&&
wget
-nc
--quiet
http://gmsh.info/bin/Linux/gmsh-4.7.0-Linux64-sdk.tgz
\
&&
tar
xzf gmsh-4.7.0-Linux64-sdk.tgz
\
&&
mv
gmsh-4.7.0-Linux64-sdk gmsh
\
&&
rm
gmsh-4.7.0-Linux64-sdk.tgz
RUN
wget
-nc
--no-check-certificate
--quiet
https://www.vtk.org/files/release/8.2/VTK-8.2.0.tar.gz
\
&&
tar
xzf VTK-8.2.0.tar.gz
\
&&
mkdir
VTK-8.2.0/build
\
&&
cd
VTK-8.2.0/build
\
...
...
@@ -36,6 +48,6 @@ RUN wget --no-check-certificate --quiet https://www.vtk.org/files/release/8.2/VT
&&
cd
-
\
&&
rm
-rf
VTK-
*
RUN
pip3
install
numpy pygmsh Pillow pydicom
RUN
pip3
install
numpy
pygmsh
==
6.1.1
Pillow pydicom
gcovr
WORKDIR
/home
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment