Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
waLBerla
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Markus Holzer
waLBerla
Commits
7ac1998d
Commit
7ac1998d
authored
1 year ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
[skip ci] test
parent
ef1077d5
No related branches found
No related tags found
No related merge requests found
Pipeline
#66312
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/benchmarks/NonUniformGridGPU/simulation_setup/benchmark_configs.py
+51
-9
51 additions, 9 deletions
...s/NonUniformGridGPU/simulation_setup/benchmark_configs.py
with
51 additions
and
9 deletions
apps/benchmarks/NonUniformGridGPU/simulation_setup/benchmark_configs.py
+
51
−
9
View file @
7ac1998d
import
waLBerla
as
wlb
from
waLBerla.tools.config
import
block_decomposition
from
waLBerla.tools.sqlitedb
import
sequenceValuesToScalars
,
checkAndUpdateSchema
,
storeSingle
import
sqlite3
import
os
...
...
@@ -25,7 +26,8 @@ class Scenario:
logger_frequency
=
30
,
blockforest_filestem
=
"
blockforest
"
,
write_setup_vtk
=
True
,
async_communication
=
False
):
async_communication
=
False
,
db_file_name
=
None
):
self
.
domain_size
=
domain_size
self
.
root_blocks
=
root_blocks
...
...
@@ -43,6 +45,7 @@ class Scenario:
self
.
logger_frequency
=
logger_frequency
self
.
async_communication
=
async_communication
self
.
db_file_name
=
DB_FILE
if
db_file_name
is
None
else
db_file_name
self
.
config_dict
=
self
.
config
(
print_dict
=
False
)
...
...
@@ -62,7 +65,7 @@ class Scenario:
'
blockForestFilestem
'
:
self
.
bfs_filestem
,
'
writeVtk
'
:
self
.
write_setup_vtk
,
'
outputStatistics
'
:
True
,
'
writeSetupForestAndReturn
'
:
Fals
e
,
'
writeSetupForestAndReturn
'
:
Tru
e
,
},
'
Parameters
'
:
{
'
omega
'
:
1.95
,
...
...
@@ -114,8 +117,8 @@ class Scenario:
table_name
=
table_name
.
replace
(
"
-
"
,
"
_
"
)
for
num_try
in
range
(
num_tries
):
try
:
checkAndUpdateSchema
(
result
,
table_name
,
DB_FILE
)
storeSingle
(
result
,
table_name
,
DB_FILE
)
checkAndUpdateSchema
(
result
,
table_name
,
self
.
db_file_name
)
storeSingle
(
result
,
table_name
,
self
.
db_file_name
)
break
except
sqlite3
.
OperationalError
as
e
:
wlb
.
log_warning
(
f
"
Sqlite DB writing failed: try
{
num_try
+
1
}
/
{
num_tries
}
{
str
(
e
)
}
"
)
...
...
@@ -142,8 +145,8 @@ def validation_run():
scenarios
.
add
(
scenario
)
def
scaling
(
num_proc
,
gpu_enabled_mpi
=
False
,
uniform
=
True
):
wlb
.
log_info_on_root
(
"
Running scaling benchmark...
"
)
def
weak_
scaling
_ldc
(
num_proc
,
gpu_enabled_mpi
=
False
,
uniform
=
True
):
wlb
.
log_info_on_root
(
"
Running
weak
scaling benchmark...
"
)
if
wlb
.
mpi
.
numProcesses
()
>
1
:
num_proc
=
wlb
.
mpi
.
numProcesses
()
...
...
@@ -157,7 +160,7 @@ def scaling(num_proc, gpu_enabled_mpi=False, uniform=True):
factor
=
int
(
num_proc
//
4
)
name
=
"
nonuniform
"
cells_per_block
=
(
1
52
,
1
52
,
1
52
)
cells_per_block
=
(
1
84
,
1
84
,
1
84
)
domain_size
=
(
cells_per_block
[
0
]
*
3
,
cells_per_block
[
1
]
*
3
,
cells_per_block
[
2
]
*
factor
)
root_blocks
=
tuple
([
d
//
c
for
d
,
c
in
zip
(
domain_size
,
cells_per_block
)])
...
...
@@ -172,9 +175,48 @@ def scaling(num_proc, gpu_enabled_mpi=False, uniform=True):
refinement_depth
=
0
if
uniform
else
3
,
timesteps
=
10
,
gpu_enabled_mpi
=
gpu_enabled_mpi
,
async_communication
=
async_communication
)
async_communication
=
async_communication
,
db_file_name
=
f
"
weakScaling
{
name
}
LDC.sqlite3
"
)
scenarios
.
add
(
scenario
)
def
strong_scaling_ldc
(
num_proc
,
gpu_enabled_mpi
=
False
,
uniform
=
True
):
wlb
.
log_info_on_root
(
"
Running strong scaling benchmark...
"
)
# This benchmark must run from 64 GPUs onwards
if
wlb
.
mpi
.
numProcesses
()
>
1
:
num_proc
=
wlb
.
mpi
.
numProcesses
()
if
num_proc
%
64
!=
0
:
raise
RuntimeError
(
"
Number of processes must be dividable by 16
"
)
cells_per_block
=
(
448
,
448
,
448
)
if
uniform
:
domain_size
=
(
cells_per_block
[
0
]
*
2
,
cells_per_block
[
1
]
*
2
,
cells_per_block
[
2
]
*
16
)
name
=
"
uniform
"
else
:
factor
=
int
(
num_proc
/
64
)
blocks64
=
block_decomposition
(
factor
)
cells_per_block
=
tuple
([
int
(
c
/
b
)
for
c
,
b
in
zip
(
cells_per_block
,
reversed
(
blocks64
))])
domain_size
=
(
cells_per_block
[
0
]
*
3
,
cells_per_block
[
1
]
*
3
,
cells_per_block
[
2
]
*
factor
)
name
=
"
nonuniform
"
root_blocks
=
tuple
([
d
//
c
for
d
,
c
in
zip
(
domain_size
,
cells_per_block
)])
scenarios
=
wlb
.
ScenarioManager
()
for
async_communication
in
[
False
,
True
]:
scenario
=
Scenario
(
blockforest_filestem
=
f
"
blockforest_
{
name
}
_
{
num_proc
}
"
,
domain_size
=
domain_size
,
root_blocks
=
root_blocks
,
num_processes
=
num_proc
,
cells_per_block
=
cells_per_block
,
refinement_depth
=
0
if
uniform
else
3
,
timesteps
=
10
,
gpu_enabled_mpi
=
gpu_enabled_mpi
,
async_communication
=
async_communication
,
db_file_name
=
f
"
strongScaling
{
name
}
LDC.sqlite3
"
)
scenarios
.
add
(
scenario
)
# validation_run()
s
caling
(
4
,
Fals
e
,
False
)
s
trong_scaling_ldc
(
1
,
Tru
e
,
False
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment