Skip to content

Commit c691185

Browse files
Merge branch 'new-benchmark' of https://github.com/feelpp/benchmarking.toolboxes into new-benchmark
2 parents 4c3176b + 4992d9e commit c691185

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1217
-492
lines changed

.github/workflows/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ jobs:
215215
- name: Render docs
216216
run: |
217217
source .venv/bin/activate
218-
render-benchmarks --config_file=./tmp/website_config.json
218+
render-benchmarks --config-file=./tmp/website_config.json
219219
- name: Compile docs
220220
run: |
221221
source .venv/bin/activate

config/tests_parallelSum/parallelSum.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
}
2121
]
2222
},
23+
// Resources for the test
24+
"resources":{
25+
"tasks":"{{parameters.resources.tasks.value}}",
26+
"exclusive_access":"{{parameters.resources.exclusive_access.value}}"
27+
},
2328
// Files containing app outputs
2429
"outputs": [
2530
{
@@ -35,7 +40,7 @@
3540
// Test parameters
3641
"parameters": [
3742
{
38-
"name": "nb_tasks",
43+
"name": "resources",
3944
"sequence": [
4045
{"tasks" : 1, "exclusive_access":true},
4146
{"tasks" : 2, "exclusive_access":true},

config/tests_parallelSum/plots.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"variables": [ "computation_time" ],
88
"names": ["Time"],
99
"xaxis":{
10-
"parameter":"nb_tasks.tasks",
10+
"parameter":"resources.tasks",
1111
"label":"Number of tasks"
1212
},
1313
"yaxis":{"label":"Execution time (s)"},
@@ -28,7 +28,7 @@
2828
},
2929
"yaxis":{"label":"Execution time (s)"},
3030
"secondary_axis":{
31-
"parameter":"nb_tasks.tasks",
31+
"parameter":"resources.tasks",
3232
"label":"Number of tasks"
3333
}
3434
},
@@ -39,7 +39,7 @@
3939
"variables": [ "computation_time" ],
4040
"names": ["Time"],
4141
"xaxis": {
42-
"parameter": "nb_tasks.tasks",
42+
"parameter": "resources.tasks",
4343
"label": "Number of tasks"
4444
},
4545
"yaxis": {

config/toolbox_heat/heat_plots.json

Lines changed: 68 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
],
1414
"names": [ ],
1515
"xaxis": {
16-
"parameter": "meshes",
16+
"parameter": "mesh",
1717
"label": "mesh levels"
1818
},
1919
"yaxis": {
@@ -28,7 +28,7 @@
2828
"label": "Measures"
2929
},
3030
"aggregations":[
31-
{"column":"nb_tasks.tasks","agg":"filter:128"}
31+
{"column":"resources.tasks","agg":"filter:640"}
3232
]
3333
},
3434
{
@@ -42,11 +42,11 @@
4242
],
4343
"names": [ ],
4444
"xaxis": {
45-
"parameter": "nb_tasks.tasks",
45+
"parameter": "resources.tasks",
4646
"label": "Number of tasks"
4747
},
4848
"secondary_axis": {
49-
"parameter": "meshes",
49+
"parameter": "mesh",
5050
"label": "Mesh level"
5151
},
5252
"yaxis": {
@@ -71,11 +71,11 @@
7171
],
7272
"names": [ ],
7373
"xaxis": {
74-
"parameter": "nb_tasks.tasks",
74+
"parameter": "resources.tasks",
7575
"label": "Number of tasks"
7676
},
7777
"secondary_axis": {
78-
"parameter": "meshes",
78+
"parameter": "mesh",
7979
"label": "Mesh level"
8080
},
8181
"yaxis": {
@@ -100,11 +100,11 @@
100100
],
101101
"names": [ ],
102102
"xaxis": {
103-
"parameter": "nb_tasks.tasks",
103+
"parameter": "resources.tasks",
104104
"label": "Number of tasks"
105105
},
106106
"secondary_axis": {
107-
"parameter": "meshes",
107+
"parameter": "mesh",
108108
"label": "Mesh level"
109109
},
110110
"yaxis": {
@@ -129,11 +129,11 @@
129129
],
130130
"names": [ ],
131131
"xaxis": {
132-
"parameter": "nb_tasks.tasks",
132+
"parameter": "resources.tasks",
133133
"label": "Number of tasks"
134134
},
135135
"secondary_axis": {
136-
"parameter": "meshes",
136+
"parameter": "mesh",
137137
"label": "Mesh level"
138138
},
139139
"yaxis": {
@@ -146,6 +146,64 @@
146146
"aggregations":[
147147
{"column":"discretization","agg":"filter:P2"}
148148
]
149+
},
150+
{
151+
"title": "Performance (P3)",
152+
"plot_types": [ "stacked_bar", "grouped_bar" ],
153+
"transformation": "performance",
154+
"variables": [
155+
"Constructor_init",
156+
"Solve_algebraic-assembly",
157+
"PostProcessing_exportResults"
158+
],
159+
"names": [ ],
160+
"xaxis": {
161+
"parameter": "resources.tasks",
162+
"label": "Number of tasks"
163+
},
164+
"secondary_axis": {
165+
"parameter": "mesh",
166+
"label": "Mesh level"
167+
},
168+
"yaxis": {
169+
"label": "execution time (s)"
170+
},
171+
"color_axis":{
172+
"parameter":"performance_variable",
173+
"label":"Performance variable"
174+
},
175+
"aggregations":[
176+
{"column":"discretization","agg":"filter:P3"}
177+
]
178+
},
179+
{
180+
"title": "Speedup (P3)",
181+
"plot_types": [ "scatter" ],
182+
"transformation": "speedup",
183+
"variables": [
184+
"Constructor_init",
185+
"Solve_algebraic-assembly",
186+
"PostProcessing_exportResults"
187+
],
188+
"names": [ ],
189+
"xaxis": {
190+
"parameter": "resources.tasks",
191+
"label": "Number of tasks"
192+
},
193+
"secondary_axis": {
194+
"parameter": "mesh",
195+
"label": "Mesh level"
196+
},
197+
"yaxis": {
198+
"label": "Speedup"
199+
},
200+
"color_axis":{
201+
"parameter":"performance_variable",
202+
"label":"Performance variable"
203+
},
204+
"aggregations":[
205+
{"column":"discretization","agg":"filter:P3"}
206+
]
149207
}
150208
]
151209
}

config/toolbox_heat/thermal_bridges_case_3.json

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
{
22
"executable": "feelpp_toolbox_heat",
3-
"output_directory": "{{machine.output_app_dir}}/toolboxes/heat/ThermalBridgesENISO10211/Case3",
3+
"output_directory": "{{machine.output_app_dir}}/javier_test/toolboxes/heat/ThermalBridgesENISO10211/Case3",
44
"use_case_name": "ThermalBridgesENISO10211",
55
"timeout":"0-00:10:00",
6-
"memory":"250G",
6+
"resources":{
7+
"tasks":"{{parameters.resources.tasks.value}}",
8+
"exclusive_access":"{{parameters.resources.exclusive_access.value}}",
9+
"memory":"{{parameters.memory.value}}"
10+
},
711
"platforms": {
812
"apptainer":{
913
"image": {
1014
"name":"{{machine.containers.apptainer.image_base_dir}}/feelpp-noble.sif"
1115
},
12-
"input_dir":"/input_data/",
16+
"input_dir":"/input_data",
1317
"options": [
1418
"--home {{machine.output_app_dir}}",
1519
"--bind {{machine.input_dataset_base_dir}}/{{use_case_name}}/:{{platforms.apptainer.input_dir}}",
@@ -29,11 +33,8 @@
2933
"--heat.scalability-save=1",
3034
"--repository.append.np 0",
3135
"--case.discretization {{parameters.discretization.value}}",
32-
"--heat.json.patch='{\"op\": \"replace\",\"path\": \"/Meshes/heat/Import/filename\",\"value\": \"{{platforms.{{machine.platform}}.input_dir}}/partitioning/case3/{{parameters.meshes.value}}/case3_p{{parameters.nb_tasks.tasks.value}}.json\" }'"
36+
"--heat.json.patch='{\"op\": \"replace\",\"path\": \"/Meshes/heat/Import/filename\",\"value\": \"{{platforms.{{machine.platform}}.input_dir}}/partitioning/case3/{{parameters.mesh.value}}/case3_p{{parameters.resources.tasks.value}}.json\" }'"
3337
],
34-
"env_variables":{
35-
"OMP_NUM_THREADS":"1"
36-
},
3738
"outputs": [
3839
{
3940
"filepath": "{{output_directory}}/{{instance}}/{{use_case_name}}/heat.measures/values.csv",
@@ -69,18 +70,34 @@
6970
},
7071
"parameters": [
7172
{
72-
"name": "nb_tasks",
73-
"sequence": [
74-
{"tasks":128,"tasks_per_node":128,"exclusive_access":true}
73+
"name": "resources",
74+
"zip":[
75+
{
76+
"name":"tasks",
77+
"sequence":[32,64,128,256]
78+
},
79+
{
80+
"name":"exclusive_access",
81+
"repeat":{"value":true,"count":4}
82+
}
7583
]
7684
},
7785
{
78-
"name": "meshes",
79-
"sequence": ["M1"]
86+
"name":"mesh",
87+
"sequence":["M1","M2","M3"]
8088
},
8189
{
82-
"name": "discretization",
83-
"sequence": ["P1"]
90+
"name":"memory",
91+
"sequence":[200, 600]
92+
},
93+
{
94+
"name":"discretization",
95+
"sequence":["P1","P2","P3"],
96+
"conditions":{
97+
"P1":{ "memory":[200] },
98+
"P2":{ "memory":[200] },
99+
"P3":{ "memory":[600], "resources.tasks":[128,256] }
100+
}
84101
},
85102
{
86103
"name": "solver",

docs/modules/ROOT/pages/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ ifdef::env-github,env-browser,env-vscode[:imagesprefix: ../images/]
44
= Benchmarking
55
:page-layout: toolboxes
66
:page-tags: catalog, catalog-index
7-
:docdatetime: 2025-01-14T15:32:33
7+
:docdatetime: 2025-01-23T13:03:51

docs/modules/tutorial/pages/configurationfiles/plots.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ For the given example, it produces the following dataframe
113113

114114
[%dynamic%open%hide_code,python]
115115
----
116-
from feelpp.benchmarking.report.strategies import StrategyFactory
116+
from feelpp.benchmarking.report.transformationFactory import TransformationStrategyFactory
117117
from feelpp.benchmarking.reframe.config.configPlots import Plot
118118
plot_config = Plot(**{
119119
"title": "Absolute performance",
@@ -131,7 +131,7 @@ plot_config = Plot(**{
131131
"label":"N"
132132
}
133133
})
134-
strategy = StrategyFactory.create(plot_config)
134+
strategy = TransformationStrategyFactory.create(plot_config)
135135
strategy.calculate(model.master_df)
136136
----
137137

@@ -141,7 +141,7 @@ The relative performance strategy computes the proportion of the time that a a `
141141

142142
[%dynamic%open%hide_code,python]
143143
----
144-
from feelpp.benchmarking.report.strategies import StrategyFactory
144+
from feelpp.benchmarking.report.transformationFactory import TransformationStrategyFactory
145145
from feelpp.benchmarking.reframe.config.configPlots import Plot
146146
plot_config = Plot(**{
147147
"title": "Absolute performance",
@@ -159,7 +159,7 @@ plot_config = Plot(**{
159159
"label":"N"
160160
}
161161
})
162-
strategy = StrategyFactory.create(plot_config)
162+
strategy = TransformationStrategyFactory.create(plot_config)
163163
strategy.calculate(model.master_df)
164164
----
165165

@@ -172,7 +172,7 @@ For the example, this strategy will produce the following.
172172

173173
[%dynamic%open%hide_code,python]
174174
----
175-
from feelpp.benchmarking.report.strategies import StrategyFactory
175+
from feelpp.benchmarking.report.transformationFactory import TransformationStrategyFactory
176176
from feelpp.benchmarking.reframe.config.configPlots import Plot
177177
plot_config = Plot(**{
178178
"title": "Absolute performance",
@@ -190,7 +190,7 @@ plot_config = Plot(**{
190190
"label":"N"
191191
}
192192
})
193-
strategy = StrategyFactory.create(plot_config)
193+
strategy = TransformationStrategyFactory.create(plot_config)
194194
strategy.calculate(model.master_df)
195195
----
196196

docs/modules/tutorial/pages/gettingstarted.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33
== Installation
44

55
1. Clone the Repository
6-
[source,cmd]
6+
[source,bash]
77
----
88
git clone https://github.com/feelpp/benchmarking.git
99
----
1010

1111
2. Use a python virtual environment [Optional]
12-
[source,cmd]
12+
[source,bash]
1313
----
1414
python3 -m venv .venv
1515
source .venv/bin/activate
1616
----
1717

1818
3. Build the project
19-
[source,cmd]
19+
[source,bash]
2020
----
2121
pip3 wheel --no-deps --wheel-dir dist .
2222
----
2323

2424
4. Install requirements
2525

2626
This will install necessary dependencies as well as the built project from the previous step.
27-
[source,cmd]
27+
[source,bash]
2828
----
2929
python3 -m pip install -r requirements.txt
3030
----
@@ -38,7 +38,7 @@ This Feel++ Benchmarking "Hello World" application will compute the sum of an ar
3838
Additionally, the app will measure the time taken to perform the partial sum, and will save it under a _scalability.json_ file.
3939

4040
The executable is already provided as _tests/data/parallelSum_. You can update it and recompile it for a specific config as needed.
41-
[source,cmd]
41+
[source,bash]
4242
----
4343
mpic++ -std=c++17 -o test/data/parallelSum test/data/parallelSum.cpp
4444
----
@@ -51,7 +51,7 @@ mpic++ -std=c++17 -o test/data/parallelSum test/data/parallelSum.cpp
5151
Configuration files might require some changes for specific configurations depending on the system you are running the framework.
5252

5353
Finally, to benchmark the test application, generate the reports and plot the figures, run
54-
[source,cmd]
54+
[source,bash]
5555
----
5656
execute-benchmark --machine-config config/machines/local.json \
5757
--benchmark-config config/test_parallelSum/parallelSum.json \

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ traitlets
1515
tabulate
1616
typing-extensions>=4.12.2
1717
python-dotenv
18-
.
18+
tikzplotly
19+
.

0 commit comments

Comments
 (0)