Skip to content
Snippets Groups Projects
Commit 5dc68b38 authored by Anna Wellmann's avatar Anna Wellmann
Browse files

Merge branch 'develop' into parameterRefactoring

parents 7c9e69b6 e3cfb269
No related branches found
No related tags found
1 merge request!228Add some tests to IndexRearrangementForStreams
Showing
with 274 additions and 2345 deletions
......@@ -16,7 +16,7 @@ AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
......@@ -50,7 +50,7 @@ BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 120
ColumnLimit: 300
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
......
......@@ -10,8 +10,9 @@
"notskm.clang-tidy",
"streetsidesoftware.code-spell-checker"
],
"containerEnv": {"TZ": "${localEnv:TZ:Europe/Berlin}"},
"runArgs": ["--gpus","all", // remove this line in case you have no gpus available
"--hostname=${localEnv:HOSTNAME}"], // HOSTNAME needs to be known by the vscode environment. It is probably necessary to add "export HOSTNAME=<hostname>" to the config file of your host machine's bash.
"image": "git.rz.tu-bs.de:4567/irmb/virtualfluids/ubuntu20_04:1.4"
"image": "git.rz.tu-bs.de:4567/irmb/virtualfluids/ubuntu20_04:1.5"
}
......@@ -3,6 +3,7 @@ build/
bin/
cmake-build-debug/
run/
buildGCC
# Python
_skbuild/
......@@ -25,6 +26,8 @@ pythonbindings/pymuparser/bindings*
# simulation results
output/
logs/
reference_data/
generated/
# grid
.grid/
......@@ -39,4 +42,7 @@ stl/
.DS_Store
# Settings
.gitconfig
\ No newline at end of file
.gitconfig
# User Settings
CMakeUserPresets.json
\ No newline at end of file
.gitlab-ci.yml 100644 → 100755
###############################################################################
## VirtualFluids CI Pipeline ##
###############################################################################
image: git.rz.tu-bs.de:4567/irmb/virtualfluids/ubuntu20_04:1.4
image: git.rz.tu-bs.de:4567/irmb/virtualfluids/ubuntu20_04:1.5
stages:
- build
......@@ -49,9 +49,10 @@ stages:
- cd $CI_PROJECT_DIR/$BUILD_FOLDER
- rm -r -f ./*
- cmake .. -LAH
--preset=all_make
--preset=make_all
-DBUILD_WARNINGS_AS_ERRORS=ON
-DCMAKE_CUDA_ARCHITECTURES=60
-DBUILD_VF_ALL_SAMPLES=ON
- make -j4
- ccache --show-stats
......@@ -75,7 +76,7 @@ clang_10:
- export CXX=clang++
###############################################################################
msvc_16:
msvc_17:
stage: build
tags:
......@@ -92,14 +93,14 @@ msvc_16:
- git --version
- $env:Path += ";C:\Program Files\CMake\bin\"
- cmake --version
- $env:Path += ";C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
- $env:Path += ";C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin"
- MSBuild.exe -version
script:
- cd $CI_PROJECT_DIR
- md -force $env:BUILD_FOLDER
- cd $env:BUILD_FOLDER
- cmake .. --preset=all_msvc -DCMAKE_CUDA_ARCHITECTURES=61 -DBUILD_WARNINGS_AS_ERRORS=ON
- cmake .. --preset=msvc_all -DCMAKE_CUDA_ARCHITECTURES=61 -DBUILD_WARNINGS_AS_ERRORS=ON -DBUILD_VF_ALL_SAMPLES=ON
- MSBuild.exe VirtualFluids.sln /property:Configuration=$env:BUILD_CONFIGURATION /verbosity:minimal /maxcpucount:4
artifacts:
......@@ -177,17 +178,17 @@ gcc_9_unit_tests:
- cd $CI_PROJECT_DIR/build
script:
- ctest
- ctest --output-on-failure
###############################################################################
msvc_16_unit_tests:
msvc_17_unit_tests:
stage: test
tags:
- win
- gpu
needs: ["msvc_16"]
needs: ["msvc_17"]
before_script:
- $env:Path += ";C:\Program Files\CMake\bin\"
......@@ -212,7 +213,6 @@ gcc_9_python_bindings_test:
script:
- python3 -m unittest discover -s Python -v
###############################################################################
gcc_9_python_hpc_test:
image: python:latest
......@@ -234,6 +234,95 @@ gcc_9_python_hpc_test:
script:
- hpc-rocket launch --watch Python/SlurmTests/poiseuille/rocket.yml
###############################################################################
build-regression-tests-ci:
image: python:3.10
stage: test
before_script:
- pip install -r utilities/ci-regression-tests/requirements.txt
script:
- python3 utilities/ci-regression-tests/generate-ci.py
artifacts:
expire_in: 1 week
paths:
- generated/
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: always
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- when: manual
allow_failure: true
needs: []
trigger-regression-tests:
stage: test
needs:
- build-regression-tests-ci
trigger:
include:
- artifact: generated/regression-tests-ci.yml
job: build-regression-tests-ci
strategy: depend
variables:
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
###############################################################################
regression_test_4gpu:
image: python:latest
stage: test
rules:
- if: $REMOTE_USER && $REMOTE_HOST && $PRIVATE_KEY && $CI_PIPELINE_SOURCE == "schedule"
when: always
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- when: manual
allow_failure: true
before_script:
- pip install hpc-rocket
- pip install "fieldcompare[all]"
script:
- hpc-rocket launch --watch regression-tests/multigpu_test/rocket4GPU.yml
- git clone --depth 1 --filter=blob:none --sparse https://github.com/irmb/test_data
- cd test_data
- git sparse-checkout set regression_tests/gpu/DrivenCavity_4GPU_2Levels regression_tests/gpu/SphereScaling_4GPU_2Levels
- cd ..
- fieldcompare dir output/4GPU test_data/regression_tests/gpu/DrivenCavity_4GPU_2Levels --include-files "DrivenCavityMultiGPU*.vtu"
- fieldcompare dir output/4GPU test_data/regression_tests/gpu/SphereScaling_4GPU_2Levels --include-files "SphereScaling*.vtu"
###############################################################################
regression_test_8gpu:
image: python:latest
stage: test
rules:
- if: $REMOTE_USER && $REMOTE_HOST && $PRIVATE_KEY && $CI_PIPELINE_SOURCE == "schedule"
when: always
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- when: manual
allow_failure: true
before_script:
- pip install hpc-rocket
- pip install "fieldcompare[all]"
script:
- hpc-rocket launch --watch regression-tests/multigpu_test/rocket8GPU.yml
- git clone --depth 1 --filter=blob:none --sparse https://github.com/irmb/test_data
- cd test_data
- git sparse-checkout set regression_tests/gpu/DrivenCavity_8GPU_2Levels regression_tests/gpu/SphereScaling_8GPU_2Levels
- cd ..
- fieldcompare dir output/8GPU test_data/regression_tests/gpu/DrivenCavity_8GPU_2Levels --include-files "DrivenCavityMultiGPU*.vtu"
- fieldcompare dir output/8GPU test_data/regression_tests/gpu/SphereScaling_8GPU_2Levels --include-files "SphereScaling*.vtu"
###############################################################################
## Benchmark ##
......@@ -273,24 +362,23 @@ gpu_numerical_tests:
before_script:
- cd /tmp
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@git.rz.tu-bs.de/irmb/test_data.git
- git clone --depth 1 --filter=blob:none --sparse https://github.com/irmb/test_data
- cd test_data
- git sparse-checkout set numerical_tests_gpu/grids numerical_tests_gpu/grids
- export CCACHE_BASEDIR=$CI_PROJECT_DIR
- export CCACHE_DIR=$CI_PROJECT_DIR/cache
- ccache -s
- mkdir -p $CI_PROJECT_DIR/build
- cd $CI_PROJECT_DIR/build
- rm -r -f ./*
- rm -rf ./*
- cmake ..
--preset=gpu_numerical_tests_make
--preset=make_numerical_tests_gpu
-DCMAKE_CUDA_ARCHITECTURES=60
-DPATH_NUMERICAL_TESTS=/tmp/test_data/numerical_tests_gpu
- make -j4
- ccache -s
script:
- cd $CI_PROJECT_DIR
# - ./build/bin/NumericalTests $CI_PROJECT_DIR/apps/gpu/tests/NumericalTests/configK15_nu10tm2.txt 2>&1 | tee -a numerical_tests_gpu_results.txt
- ./build/bin/NumericalTests $CI_PROJECT_DIR/apps/gpu/tests/NumericalTests/configK17chim_nu10tm3.txt 2>&1 | tee -a numerical_tests_gpu_results.txt
- $CI_PROJECT_DIR/build/bin/NumericalTests $CI_PROJECT_DIR/apps/gpu/tests/NumericalTests/configK17chim_nu10tm3.txt /tmp/test_data/numerical_tests_gpu/ 2>&1 | tee -a numerical_tests_gpu_results.txt
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
......@@ -302,31 +390,6 @@ gpu_numerical_tests:
paths:
- $CI_PROJECT_DIR/numerical_tests_gpu_results.txt
###############################################################################
run-regression-tests:
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: always
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- when: manual
allow_failure: true
needs: []
tags:
- gpu
- linux
before_script:
- apt-get update && apt-get -y install python3.8-venv
- chmod +x ./regression-tests/*
script:
- ./regression-tests/regression-tests.sh
###############################################################################
## Code analysis ##
###############################################################################
......@@ -352,7 +415,7 @@ clang_build_analyzer_clang_10:
- mkdir -p $CI_PROJECT_DIR/build
- cd $CI_PROJECT_DIR/build
- cmake ..
--preset=all_make
--preset=make_all
-DCMAKE_CUDA_ARCHITECTURES=60
-DCMAKE_CXX_FLAGS=-ftime-trace
- ClangBuildAnalyzer --start .
......@@ -384,7 +447,7 @@ include_what_you_use_clang_10:
- mkdir -p $CI_PROJECT_DIR/build
- cd $CI_PROJECT_DIR/build
- cmake ..
--preset=all_make
--preset=make_all
-DCMAKE_CUDA_ARCHITECTURES=60
-DBUILD_VF_INCLUDE_WHAT_YOU_USE=ON
- make
......@@ -461,7 +524,7 @@ gcov_gcc_9:
- mkdir -p $CI_PROJECT_DIR/build
- cd $CI_PROJECT_DIR/build
- cmake ..
--preset=all_make
--preset=make_all
-DCMAKE_CUDA_ARCHITECTURES=60
-DBUILD_VF_COVERAGE=ON
- make -j4
......@@ -546,8 +609,6 @@ pages:
.deploy_template:
stage: deploy
before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- apt-get install -y rsync
......
This diff is collapsed.
var barrierList = [
{ name: "Short line",
locations: [
12, 15,
12, 16,
12, 17,
12, 18,
12, 19,
12, 20,
12, 21,
12, 22,
12, 23]
},
{ name: "Long line",
locations: [
13, 11,
13, 12,
13, 13,
13, 14,
13, 15,
13, 16,
13, 17,
13, 18,
13, 19,
13, 20,
13, 21,
13, 22,
13, 23,
13, 24,
13, 25,
13, 26,
13, 27,
13, 28
]
},
{ name: "Diagonal",
locations: [
30, 14,
29, 15,
30, 15,
28, 16,
29, 16,
27, 17,
28, 17,
26, 18,
27, 18,
25, 19,
26, 19,
24, 20,
25, 20,
23, 21,
24, 21,
22, 22,
23, 22,
21, 23,
22, 23,
20, 24,
21, 24,
19, 25,
20, 25,
18, 26,
19, 26,
17, 27,
18, 27,
16, 28,
17, 28,
15, 29,
16, 29,
14, 30,
15, 30,
13, 31,
14, 31
]
},
{ name: "Shallow diagonal",
locations: [
47, 18,
48, 18,
49, 18,
50, 18,
44, 19,
45, 19,
46, 19,
47, 19,
41, 20,
42, 20,
43, 20,
44, 20,
38, 21,
39, 21,
40, 21,
41, 21,
35, 22,
36, 22,
37, 22,
38, 22,
32, 23,
33, 23,
34, 23,
35, 23,
29, 24,
30, 24,
31, 24,
32, 24,
26, 25,
27, 25,
28, 25,
29, 25,
23, 26,
24, 26,
25, 26,
26, 26,
20, 27,
21, 27,
22, 27,
23, 27,
17, 28,
18, 28,
19, 28,
20, 28
]
},
{ name: "Small circle",
locations: [
14, 11,
15, 11,
16, 11,
17, 11,
18, 11,
13, 12,
14, 12,
18, 12,
19, 12,
12, 13,
13, 13,
19, 13,
20, 13,
12, 14,
20, 14,
12, 15,
20, 15,
12, 16,
20, 16,
12, 17,
13, 17,
19, 17,
20, 17,
13, 18,
14, 18,
18, 18,
19, 18,
14, 19,
15, 19,
16, 19,
17, 19,
18, 19
]
},
{ name: "Large circle",
locations: [
19, 11,
20, 11,
21, 11,
22, 11,
23, 11,
24, 11,
17, 12,
18, 12,
19, 12,
24, 12,
25, 12,
26, 12,
16, 13,
17, 13,
26, 13,
27, 13,
15, 14,
16, 14,
27, 14,
28, 14,
14, 15,
15, 15,
28, 15,
29, 15,
14, 16,
29, 16,
13, 17,
14, 17,
29, 17,
30, 17,
13, 18,
30, 18,
13, 19,
30, 19,
13, 20,
30, 20,
13, 21,
30, 21,
13, 22,
14, 22,
29, 22,
30, 22,
14, 23,
29, 23,
14, 24,
15, 24,
28, 24,
29, 24,
15, 25,
16, 25,
27, 25,
28, 25,
16, 26,
17, 26,
26, 26,
27, 26,
17, 27,
18, 27,
19, 27,
24, 27,
25, 27,
26, 27,
19, 28,
20, 28,
21, 28,
22, 28,
23, 28,
24, 28
]
},
{ name: "Line with spoiler",
locations: [
16, 20,
16, 21,
16, 22,
16, 23,
16, 24,
17, 24,
18, 24,
19, 24,
20, 24,
21, 24,
22, 24,
23, 24,
24, 24,
25, 24,
26, 24,
27, 24,
28, 24,
29, 24,
30, 24,
31, 24,
32, 24,
33, 24,
34, 24,
35, 24,
36, 24,
37, 24,
38, 24,
39, 24,
40, 24,
41, 24,
42, 24,
43, 24,
44, 24,
45, 24,
46, 24,
47, 24,
48, 24,
49, 24,
50, 24,
16, 25,
16, 26,
16, 27,
16, 28
]
},
{ name: "Circle with spoiler",
locations: [
29, 36,
30, 36,
31, 36,
32, 36,
33, 36,
28, 37,
29, 37,
33, 37,
34, 37,
27, 38,
28, 38,
34, 38,
35, 38,
27, 39,
35, 39,
27, 40,
35, 40,
36, 40,
37, 40,
38, 40,
39, 40,
40, 40,
41, 40,
42, 40,
43, 40,
44, 40,
45, 40,
46, 40,
47, 40,
48, 40,
49, 40,
50, 40,
51, 40,
52, 40,
53, 40,
54, 40,
55, 40,
56, 40,
57, 40,
58, 40,
59, 40,
60, 40,
61, 40,
62, 40,
63, 40,
64, 40,
65, 40,
66, 40,
67, 40,
68, 40,
69, 40,
27, 41,
35, 41,
27, 42,
28, 42,
34, 42,
35, 42,
28, 43,
29, 43,
33, 43,
34, 43,
29, 44,
30, 44,
31, 44,
32, 44,
33, 44
]
},
{ name: "Right angle",
locations: [
27, 36,
28, 36,
29, 36,
30, 36,
31, 36,
32, 36,
33, 36,
34, 36,
35, 36,
36, 36,
37, 36,
38, 36,
39, 36,
40, 36,
41, 36,
42, 36,
43, 36,
44, 36,
45, 36,
46, 36,
47, 36,
48, 36,
49, 36,
50, 36,
51, 36,
52, 36,
53, 36,
54, 36,
55, 36,
56, 36,
57, 36,
58, 36,
59, 36,
60, 36,
61, 36,
62, 36,
63, 36,
64, 36,
65, 36,
66, 36,
67, 36,
68, 36,
69, 36,
70, 36,
71, 36,
72, 36,
73, 36,
74, 36,
75, 36,
76, 36,
77, 36,
78, 36,
79, 36,
27, 37,
27, 38,
27, 39,
27, 40,
27, 41,
27, 42,
27, 43,
27, 44
]
},
{ name: "Wedge",
locations: [
27, 36,
28, 36,
29, 36,
30, 36,
31, 36,
32, 36,
33, 36,
34, 36,
35, 36,
36, 36,
37, 36,
38, 36,
39, 36,
40, 36,
41, 36,
42, 36,
43, 36,
44, 36,
45, 36,
46, 36,
47, 36,
48, 36,
49, 36,
50, 36,
51, 36,
52, 36,
53, 36,
54, 36,
55, 36,
56, 36,
57, 36,
58, 36,
59, 36,
60, 36,
61, 36,
62, 36,
63, 36,
64, 36,
65, 36,
66, 36,
67, 36,
68, 36,
69, 36,
70, 36,
71, 36,
72, 36,
73, 36,
74, 36,
75, 36,
76, 36,
77, 36,
78, 36,
79, 36,
27, 37,
67, 37,
68, 37,
69, 37,
70, 37,
71, 37,
72, 37,
73, 37,
27, 38,
61, 38,
62, 38,
63, 38,
64, 38,
65, 38,
66, 38,
67, 38,
27, 39,
55, 39,
56, 39,
57, 39,
58, 39,
59, 39,
60, 39,
61, 39,
27, 40,
49, 40,
50, 40,
51, 40,
52, 40,
53, 40,
54, 40,
55, 40,
27, 41,
43, 41,
44, 41,
45, 41,
46, 41,
47, 41,
48, 41,
49, 41,
27, 42,
37, 42,
38, 42,
39, 42,
40, 42,
41, 42,
42, 42,
43, 42,
27, 43,
31, 43,
32, 43,
33, 43,
34, 43,
35, 43,
36, 43,
37, 43,
27, 44,
28, 44,
29, 44,
30, 44,
31, 44
]
},
{ name: "Airfoil",
locations: [
17, 16,
18, 16,
19, 16,
20, 16,
21, 16,
22, 16,
23, 16,
24, 16,
25, 16,
26, 16,
27, 16,
28, 16,
29, 16,
30, 16,
31, 16,
32, 16,
33, 16,
34, 16,
35, 16,
36, 16,
37, 16,
38, 16,
39, 16,
40, 16,
41, 16,
42, 16,
43, 16,
44, 16,
45, 16,
46, 16,
47, 16,
48, 16,
49, 16,
50, 16,
51, 16,
52, 16,
53, 16,
54, 16,
55, 16,
56, 16,
57, 16,
58, 16,
59, 16,
60, 16,
61, 16,
62, 16,
63, 16,
64, 16,
65, 16,
66, 16,
67, 16,
68, 16,
14, 17,
15, 17,
16, 17,
17, 17,
56, 17,
57, 17,
58, 17,
59, 17,
60, 17,
61, 17,
62, 17,
13, 18,
14, 18,
50, 18,
51, 18,
52, 18,
53, 18,
54, 18,
55, 18,
56, 18,
13, 19,
44, 19,
45, 19,
46, 19,
47, 19,
48, 19,
49, 19,
50, 19,
13, 20,
38, 20,
39, 20,
40, 20,
41, 20,
42, 20,
43, 20,
44, 20,
13, 21,
14, 21,
32, 21,
33, 21,
34, 21,
35, 21,
36, 21,
37, 21,
38, 21,
14, 22,
15, 22,
26, 22,
27, 22,
28, 22,
29, 22,
30, 22,
31, 22,
32, 22,
15, 23,
16, 23,
17, 23,
18, 23,
21, 23,
22, 23,
23, 23,
24, 23,
25, 23,
26, 23,
18, 24,
19, 24,
20, 24,
21, 24
]
}
];
\ No newline at end of file
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
type: software
authors:
- family-names: Kutscher
given-names: Konstantin
orcid: https://orcid.org/0000-0002-1099-1608
- family-names: Schönherr
given-names: Martin
orcid: https://orcid.org/0000-0002-4774-1776
- family-names: Geier
given-names: Martin
orcid: https://orcid.org/0000-0002-8367-9412
- family-names: Krafczyk
given-names: Manfred
orcid: https://orcid.org/0000-0002-8509-0871
- family-names: Alihussein
given-names: Hussein
orcid: https://orcid.org/0000-0003-3656-7028
- family-names: Linxweiler
given-names: Jan
orcid: https://orcid.org/0000-0002-2755-5087
- family-names: Peters
given-names: Sören
orcid: https://orcid.org/0000-0001-5236-3776
- family-names: Wellmann
given-names: Anna
orcid: https://orcid.org/0000-0002-8825-2995
- family-names: Safari
given-names: Hesameddin
orcid: https://orcid.org/0000-0002-2755-5087
- family-names: Marcus
given-names: Sven
orcid: https://orcid.org/0000-0003-3689-2162
title: "VirtualFluids"
version: 0.1.0
license: GPL-3.0-or-later
repository-code: "https://git.rz.tu-bs.de/irmb/VirtualFluids"
date-released: "XXXXXXX"
......@@ -5,7 +5,7 @@
## After function call the files are stored in: MY_SRCS
#################################################################################
macro(includeAllFiles targetName file_path)
macro(includeAllFiles folderName targetName file_path)
if(NOT DEFINED collectTestFiles)
set(collectTestFiles ON)
endif()
......@@ -14,11 +14,11 @@ macro(includeAllFiles targetName file_path)
set(collectProductionFiles ON)
endif()
includeFiles(${targetName} "${file_path}")
includeFiles(${folderName} ${targetName} "${file_path}")
endmacro(includeAllFiles)
macro(includeProductionFiles targetName file_path)
macro(includeProductionFiles folderName targetName file_path)
if(NOT DEFINED collectTestFiles)
set(collectTestFiles OFF)
endif()
......@@ -27,12 +27,12 @@ macro(includeProductionFiles targetName file_path)
set(collectProductionFiles ON)
endif()
includeFiles(${targetName} "${file_path}")
includeFiles(${folderName} ${targetName} "${file_path}")
endmacro(includeProductionFiles)
macro(includeTestFiles targetName file_paths)
macro(includeTestFiles folderName file_paths)
if(NOT DEFINED collectTestFiles)
set(collectTestFiles ON)
endif()
......@@ -41,13 +41,13 @@ macro(includeTestFiles targetName file_paths)
set(collectProductionFiles OFF)
endif()
includeFiles(${targetName} "${file_paths}")
includeFiles(${folderName} ${folderName} "${file_paths}")
endmacro(includeTestFiles)
macro(includeFiles targetName file_paths)
macro(includeFiles folderName targetName file_paths)
foreach(file ${file_paths})
......@@ -57,7 +57,7 @@ macro(includeFiles targetName file_paths)
collectFilesFrom(${file})
if (package_dir)
setSourceGroupForFilesIn(${file} ${package_dir} ${targetName})
setSourceGroupForFilesIn(${file} ${package_dir} ${targetName} ${folderName})
endif()
endforeach()
......@@ -90,9 +90,9 @@ endmacro()
macro(setSourceGroupForFilesIn file package_dir targetName)
macro(setSourceGroupForFilesIn file package_dir targetName folderName)
#input: target_name PACKAGE_SRCS
buildSourceGroup(${targetName} ${package_dir})
buildSourceGroup(${folderName} ${package_dir})
if(isAllTestSuite)
source_group(${targetName}\\${SOURCE_GROUP} FILES ${file})
......@@ -105,20 +105,20 @@ endmacro(setSourceGroupForFilesIn)
macro(buildSourceGroup targetName path)
#input: targetName (e.g. lib name, exe name)
macro(buildSourceGroup folderName path)
#input: folderName (e.g. name of folder after src/)
unset(SOURCE_GROUP)
string(REPLACE "/" ";" folderListFromPath ${path})
set(findTargetName 0)
set(findFolderName 0)
foreach(folder ${folderListFromPath})
if(findTargetName)
if(findFolderName)
set(SOURCE_GROUP ${SOURCE_GROUP}\\${folder})
endif()
if(${folder} STREQUAL ${targetName})
SET(findTargetName 1)
if(${folder} STREQUAL ${folderName})
SET(findFolderName 1)
endif()
endforeach()
......
......@@ -105,14 +105,15 @@ function(vf_add_library)
set( options )
set( oneValueArgs NAME BUILDTYPE)
set( multiValueArgs PUBLIC_LINK PRIVATE_LINK FILES FOLDER EXCLUDE)
set( multiValueArgs PUBLIC_LINK PRIVATE_LINK FILES FOLDER EXCLUDE MODULEFOLDER)
cmake_parse_arguments( ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
if(DEFINED ARG_NAME)
if(DEFINED ARG_NAME)
set(library_name ${ARG_NAME})
else()
vf_get_library_name (library_name)
endif()
vf_get_library_name (folder_name) # folder_name is not equal to library_name when ARG_NAME was set
if(NOT DEFINED ARG_BUILDTYPE)
if(BUILD_SHARED_LIBS)
......@@ -122,12 +123,16 @@ function(vf_add_library)
endif()
endif()
if(DEFINED ARG_MODULEFOLDER)
set(folder_name ${ARG_MODULEFOLDER})
endif()
status("Configuring the target: ${library_name} (type=${ARG_BUILDTYPE})...")
collectFiles(sourceFiles "${ARG_FILES}" "${ARG_FOLDER}" "${ARG_EXCLUDE}")
includeProductionFiles (${library_name} "${sourceFiles}")
includeProductionFiles (${folder_name} ${library_name} "${sourceFiles}")
#################################################################
### ADD TARGET ###
......@@ -325,4 +330,4 @@ function(vf_load_user_apps)
foreach(app IN LISTS USER_APPS)
add_subdirectory(${app})
endforeach()
endfunction()
\ No newline at end of file
endfunction()
......@@ -6,10 +6,6 @@
set(CMAKE_CUDA_ARCHITECTURES 86) # Nvidia GeForce RTX 3060
# numerical tests location of the grids
# SET(PATH_NUMERICAL_TESTS "E:/temp/numericalTests/")
# list(APPEND VF_COMPILER_DEFINITION "PATH_NUMERICAL_TESTS=${PATH_NUMERICAL_TESTS}")
# add invidual apps here
set(GPU_APP "apps/gpu/LBM/")
list(APPEND USER_APPS
......
......@@ -14,4 +14,9 @@ list(APPEND USER_APPS
"${GPU_APP}DrivenCavityMultiGPU"
"${GPU_APP}SphereScaling"
# "${GPU_APP}MusselOyster"
)
\ No newline at end of file
)
# add_compile_options(-fsanitize=address)
# add_link_options(-fsanitize=address)
# add_compile_options(-fsanitize=undefined)
# add_link_options(-fsanitize=undefined)
......@@ -48,25 +48,6 @@ set(LIGGGHTS_RELEASE_LIBRARY "d:/Tools/LIGGGHTS/build/Release/liggghts.lib")
# SET(METIS_RELEASE_LIBRARY "/mnt/d/Tools/metis-5.1.0/build/Linux-x86_64/libmetis/libmetis.a")
#ENDIF()
#################################################################################
# PE
#################################################################################
IF(${USE_DEM_COUPLING})
SET(PE_BINARY_DIR "d:/Tools/waLBerla/walberlaGit/build" CACHE PATH "pe binary dir")
SET(PE_ROOT "d:/Tools/waLBerla/walberlaGit" CACHE PATH "pe root")
SET(PE_DEBUG_LIBRARY ${PE_BINARY_DIR}/src/pe/Debug/pe.lib)
SET(PE_RELEASE_LIBRARY ${PE_BINARY_DIR}/src/pe/Release/pe.lib)
SET(BLOCKFOREST_DEBUG_LIBRARY ${PE_BINARY_DIR}/src/blockforest/Debug/blockforest.lib)
SET(BLOCKFOREST_RELEASE_LIBRARY ${PE_BINARY_DIR}/src/blockforest/Release/blockforest.lib)
SET(DOMAIN_DECOMPOSITION_DEBUG_LIBRARY ${PE_BINARY_DIR}/src/domain_decomposition/Debug/domain_decomposition.lib)
SET(DOMAIN_DECOMPOSITION_RELEASE_LIBRARY ${PE_BINARY_DIR}/src/domain_decomposition/Release/domain_decomposition.lib)
SET(GEOMETRY_DEBUG_LIBRARY ${PE_BINARY_DIR}/src/geometry/Debug/geometry.lib)
SET(GEOMETRY_RELEASE_LIBRARY ${PE_BINARY_DIR}/src/geometry/Release/geometry.lib)
SET(CORE_DEBUG_LIBRARY ${PE_BINARY_DIR}/src/core/Debug/core.lib)
SET(CORE_RELEASE_LIBRARY ${PE_BINARY_DIR}/src/core/Release/core.lib)
ENDIF()
##################################################################################
# FETOL
......
......@@ -4,7 +4,4 @@
# OS: Windows 10
#################################################################################
#SET(PATH_NUMERICAL_TESTS "E:/temp/numericalTests/")
#LIST(APPEND VF_COMPILER_DEFINITION "PATH_NUMERICAL_TESTS=${PATH_NUMERICAL_TESTS}")
SET(CMAKE_CUDA_ARCHITECTURES 61)
\ No newline at end of file
#################################################################################
# VirtualFluids MACHINE FILE
# Responsible: Hussein Alihussein
# OS: Windows 10
#################################################################################
#################################################################################
# BOOST
#################################################################################
SET(BOOST_VERSION "1.76.0")
SET(BOOST_ROOT "C:/Users/hussein/Documents/VirtualFluids/boost_1_76_0")
SET(BOOST_DIR ${BOOST_ROOT})
SET(BOOST_LIBRARYDIR ${BOOST_ROOT}"/stageMSVC64/lib")
#################################################################################
......@@ -12,4 +12,5 @@ set(PATH_NUMERICAL_TESTS "D:/out/numericalTests/")
list(APPEND VF_COMPILER_DEFINITION "PATH_NUMERICAL_TESTS=${PATH_NUMERICAL_TESTS}")
# add invidual apps here
list(APPEND USER_APPS "apps/gpu/LBM/WTG_RUB")
\ No newline at end of file
list(APPEND USER_APPS "apps/gpu/LBM/WTG_RUB")
list(APPEND USER_APPS "apps/gpu/LBM/TGV_3D_GridRef")
......@@ -4,24 +4,6 @@
# OS: CentOS 7.3
#################################################################################
#################################################################################
# PE (legacy)
#################################################################################
IF(${USE_DEM_COUPLING})
SET(PE_BINARY_DIR "/home/irmb/walberla-git/build" CACHE PATH "pe binary dir")
SET(PE_ROOT "/home/irmb/walberla-git" CACHE PATH "pe root")
SET(PE_DEBUG_LIBRARY ${PE_BINARY_DIR}/src/pe/libpe.a)
SET(PE_RELEASE_LIBRARY ${PE_BINARY_DIR}/src/pe/libpe.a)
SET(BLOCKFOREST_DEBUG_LIBRARY ${PE_BINARY_DIR}/src/blockforest/libblockforest.a)
SET(BLOCKFOREST_RELEASE_LIBRARY ${PE_BINARY_DIR}/src/blockforest/libblockforest.a)
SET(DOMAIN_DECOMPOSITION_DEBUG_LIBRARY ${PE_BINARY_DIR}/src/domain_decomposition/libdomain_decomposition.a)
SET(DOMAIN_DECOMPOSITION_RELEASE_LIBRARY ${PE_BINARY_DIR}/src/domain_decomposition/libdomain_decomposition.a)
SET(GEOMETRY_DEBUG_LIBRARY ${PE_BINARY_DIR}/src/geometry/libgeometry.a)
SET(GEOMETRY_RELEASE_LIBRARY ${PE_BINARY_DIR}/src/geometry/libgeometry.a)
SET(CORE_DEBUG_LIBRARY ${PE_BINARY_DIR}/src/core/libcore.a)
SET(CORE_RELEASE_LIBRARY ${PE_BINARY_DIR}/src/core/libcore.a)
ENDIF()
## nvidia
set(CMAKE_CUDA_ARCHITECTURES 60) # NVIDIA Tesla P100
......
......@@ -9,7 +9,7 @@
cmake_minimum_required(VERSION 3.15..3.20 FATAL_ERROR)
project(VirtualFluids
VERSION 1.0.0
VERSION 0.1.0
DESCRIPTION "CFD code based on the Lattice Boltzmann Method"
HOMEPAGE_URL "https://www.tu-braunschweig.de/irmb/forschung/virtualfluids"
LANGUAGES CXX)
......@@ -52,9 +52,6 @@ option(BUILD_USE_BOOST "Build VirtualFluids with boost" OFF)
option(BUILD_USE_MPI "include MPI library support" ON)
# vf gpu
option(BUILD_VF_GKS "Build VirtualFluids GKS" OFF )
option(BUILD_VF_TRAFFIC "Build VirtualFluids Traffic" OFF)
option(BUILD_JSONCPP "Builds json cpp " OFF)
option(BUILD_NUMERIC_TESTS "Build numeric tests" OFF)
option(BUILD_VF_UNIT_TESTS "Build VirtualFluids unit tests" OFF)
......@@ -78,7 +75,7 @@ endif()
option(BUILD_VF_PYTHON_BINDINGS "" OFF)
option(BUILD_VF_DOUBLE_ACCURACY "Use double accuracy" OFF)
option(BUILD_VF_ALL_SAMPLES "Build All Samples" OFF)
#################################################################################
# MACROS
......@@ -100,7 +97,7 @@ IF( BUILD_VF_DOUBLE_ACCURACY )
ENDIF()
# set gpu features
if(BUILD_VF_GPU OR BUILD_VF_GKS)
if(BUILD_VF_GPU)
include(CheckLanguage)
check_language(CUDA)
......@@ -137,6 +134,8 @@ if(BUILD_VF_GPU OR BUILD_VF_GKS)
message(STATUS "CMAKE_CUDA_FLAGS: ${CMAKE_CUDA_FLAGS}")
message(STATUS "CUDA Architecture: ${CMAKE_CUDA_ARCHITECTURES}")
set(CMAKE_CUDA_ARCHITECTURES "${CMAKE_CUDA_ARCHITECTURES}" CACHE STRING "Cuda Architecture (compute capabilitiy)")
set(CMAKE_CUDA_FLAGS_DEBUG " -G" CACHE STRING "" FORCE)
endif()
......@@ -212,11 +211,11 @@ add_subdirectory(src/lbm)
# VIRTUAL FLUIDS CPU / GPU
#################################################################################
if (BUILD_VF_CPU)
include (cpu.cmake)
include(cpu.cmake)
endif()
if(BUILD_VF_GPU OR BUILD_VF_GKS)
if(BUILD_VF_GPU)
add_subdirectory(src/cuda)
include (gpu.cmake)
include(gpu.cmake)
endif()
if (BUILD_VF_PYTHON_BINDINGS)
......
{
"version": 2,
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 20,
"minor": 21,
"patch": 0
},
"configurePresets": [
{
"name": "default",
"hidden": true,
"binaryDir": "${sourceDir}/build/"
"binaryDir": "build",
"hidden": true
},
{
"name": "msvc",
"hidden": true,
"generator": "Visual Studio 16 2019",
"architecture": "x64"
"generator": "Visual Studio 17 2022",
"architecture": "x64",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "make",
"hidden": true,
"generator": "Unix Makefiles"
"generator": "Unix Makefiles",
"condition": {
"type": "notEquals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "unit_tests",
......@@ -49,34 +59,6 @@
"BUILD_VF_DOUBLE_ACCURACY": "OFF"
}
},
{
"name": "debug",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "release",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "min_size_rel",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "MinSizeRel"
}
},
{
"name": "rel_with_deb_info",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "gpu_numerical_tests",
"inherits": [
......@@ -91,7 +73,7 @@
}
},
{
"name": "all_make",
"name": "make_all",
"inherits": [
"cpu",
"gpu",
......@@ -101,162 +83,66 @@
"displayName": "all make configuration"
},
{
"name": "all_msvc",
"name": "make_cpu",
"inherits": [
"cpu",
"gpu",
"unit_tests",
"msvc"
],
"displayName": "all msvc configuration"
},
{
"name": "gpu_numerical_tests_make",
"inherits": [
"gpu_numerical_tests",
"make"
],
"displayName": "gpu numerical tests make configuration"
"displayName": "cpu make configuration"
},
{
"name": "gpu_numerical_tests_msvc",
"inherits": [
"msvc",
"gpu_numerical_tests"
],
"displayName": "gpu numerical tests msvc configuration"
},
{
"name": "debug_make_gpu",
"displayName": "Debug GPU Make",
"inherits": [
"gpu",
"make",
"debug"
]
},
{
"name": "release_make_gpu",
"displayName": "Release GPU Make",
"name": "make_gpu",
"inherits": [
"gpu",
"make",
"release"
]
},
{
"name": "min_size_rel_make_gpu",
"displayName": "MinSizeRel GPU Make",
"inherits": [
"gpu",
"make",
"min_size_rel"
]
"unit_tests",
"make"
],
"displayName": "gpu make configuration"
},
{
"name": "rel_with_deb_info_make_gpu",
"displayName": "RelWithDebInfo GPU Make",
"name": "msvc_all",
"inherits": [
"cpu",
"gpu",
"make",
"rel_with_deb_info"
]
"unit_tests",
"msvc"
],
"displayName": "all msvc configuration"
},
{
"name": "debug_msvc_gpu",
"displayName": "Debug GPU MSVC",
"name": "msvc_cpu",
"inherits": [
"gpu",
"msvc",
"debug"
]
"cpu",
"unit_tests",
"msvc"
],
"displayName": "cpu msvc configuration"
},
{
"name": "release_msvc_gpu",
"displayName": "Release GPU MSVC",
"name": "msvc_gpu",
"inherits": [
"gpu",
"msvc",
"release"
]
"unit_tests",
"msvc"
],
"displayName": "gpu msvc configuration"
},
{
"name": "min_size_rel_msvc_gpu",
"displayName": "MinSizeRel GPU MSVC",
"name": "make_numerical_tests_gpu",
"inherits": [
"gpu",
"msvc",
"min_size_rel"
]
"gpu_numerical_tests",
"make"
],
"displayName": "gpu numerical tests make configuration"
},
{
"name": "rel_with_deb_info_msvc_gpu",
"displayName": "RelWithDebInfo GPU MSVC",
"name": "msvc_numerical_tests_gpu",
"inherits": [
"gpu",
"msvc",
"rel_with_deb_info"
]
}
],
"buildPresets": [
{
"name": "Default",
"hidden": true,
"configurePreset": "default",
"jobs": 4
},
{
"name": "GPU",
"hidden": true,
"configurePreset": "gpu",
"targets": [
"ActuatorLine",
"DrivenCavity",
"BoundaryLayer"
"gpu_numerical_tests"
],
"inherits": [
"Default"
]
},
{
"name": "Release",
"hidden": true,
"configurePreset": "release"
},
{
"name": "Debug_Make_GPU",
"displayName": "Debug",
"description": "Compile GPU version with debug information",
"configurePreset": "debug_make_gpu",
"inherits": [
"GPU"
]
},
{
"name": "MinSizeRel_Make_GPU",
"displayName": "MinSizeRel",
"configurePreset": "min_size_rel_make_gpu",
"inherits": [
"GPU"
]
},
{
"name": "RelWithDebInfo_GPU",
"displayName": "RelWithDebInfo",
"configurePreset": "rel_with_deb_info_make_gpu",
"inherits": [
"GPU"
]
},
{
"name": "Release_GPU",
"description": "Build release version of GPU",
"displayName": "Release GPU",
"configurePreset": "release_make_gpu",
"inherits": [
"GPU"
]
"displayName": "gpu numerical tests msvc configuration"
}
]
}
\ No newline at end of file
}
......@@ -14,12 +14,18 @@
# clangd language server https://clangd.llvm.org/
# python pip3 with modules: setuptools, wheels, scikit-build, pyvista, numpy, ansible, gcovr
# software-properties-common for add-apt-repository
FROM nvidia/cuda:11.3.1-devel-ubuntu20.04
# timezone
ARG TZ
ENV TZ="$TZ"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y \
wget unzip git \
wget unzip software-properties-common \
build-essential gdb \
ccache \
ninja-build \
......@@ -36,16 +42,13 @@ RUN apt-get update && \
cppcheck \
clangd-12 \
&& update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-12 100 \
&& mkdir -p /usr/local/cmake/ && cd /usr/local/cmake/ \
&& version=3.24 && build=0 \
&& wget https://cmake.org/files/v$version/cmake-$version.$build-linux-x86_64.tar.gz \
&& tar -xzvf cmake-$version.$build-linux-x86_64.tar.gz \
&& ln -s /usr/local/cmake/cmake-$version.$build-linux-x86_64/bin/* /usr/local/bin/ \
&& pip3 install \
cmake==3.26.3 \
setuptools \
wheel \
scikit-build \
pyvista \
numpy \
ansible \
'jinja2<3.1' gcovr==5.0
'jinja2<3.1' gcovr==5.0 \
&& apt update && add-apt-repository -y ppa:git-core/ppa && apt update && apt install git -y
BootStrap: docker
From: ubuntu:20.04
%files
3rdParty 3rdParty
apps apps
CMake CMake
Python Python
src src
CMakeLists.txt CMakeLists.txt
cpu.cmake cpu.cmake
gpu.cmake gpu.cmake
setup.py setup.py
pyproject.toml pyproject.toml
%post
apt-get update && \
apt-get install -y \
build-essential \
cmake=3.16.3-1ubuntu1 \
openmpi-bin=4.0.3-0ubuntu1 \
libomp-dev
mkdir -p build && \
cmake -DBUILD_VF_CPU=ON -DBUILD_VF_UNIT_TESTS=ON &&\
make -j4 2>&1
%runscript
bin/basicsTest
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment