From 283727a2e4db5650567deee59e4fc7be731a5f1a Mon Sep 17 00:00:00 2001 From: Donnot Benjamin Date: Wed, 27 Mar 2024 22:36:02 +0100 Subject: [PATCH 1/2] adding benchmark on windows [skip ci] --- README.md | 2 +- .../ls0.8.1_glop1.9.5_py38.rst | 118 ++++++++++++++++++ docs/benchmarks.rst | 6 + 3 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 docs/benchmark_solver/windows_10_portable/ls0.8.1_glop1.9.5_py38.rst diff --git a/README.md b/README.md index c989f34..e0db59e 100644 --- a/README.md +++ b/README.md @@ -222,7 +222,7 @@ For example: `export PATH_NICSLU=/home/user/Documents/cktso` #### Enable 03 optimization By default, at least on ubuntu, only the "-O2" compiler flags is used. To use the O3 optimization flag, you need -to specify the `__O3_OPTIM` environment variable: `set __O3_OPTIM=1` before the compilation (so before +to specify the `__O3_OPTIM` environment variable: `set __O3_OPTIM=1` (or `$Env:__O3_OPTIM=1` in powershell) before the compilation (so before `python3 setup.py build` or `python -m pip install -e .`) This compilation argument will increase the compilation time, but will make the package faster. diff --git a/docs/benchmark_solver/windows_10_portable/ls0.8.1_glop1.9.5_py38.rst b/docs/benchmark_solver/windows_10_portable/ls0.8.1_glop1.9.5_py38.rst new file mode 100644 index 0000000..d9ae890 --- /dev/null +++ b/docs/benchmark_solver/windows_10_portable/ls0.8.1_glop1.9.5_py38.rst @@ -0,0 +1,118 @@ +Lightsim2grid 0.8.1 and grid2op 1.9.5 (python 3.8) +==================================================== + +l2rpn_case14_sandbox +--------------------- + +Configuration: + +- date: 2024-03-27 22:19 Paris, Madrid +- system: Windows 10 +- OS: +- processor: AMD Ryzen 7 4800HS with Radeon Graphics +- python version: 3.8.3.final.0 (64 bit) +- numpy version: 1.21.0 +- pandas version: 2.0.3 +- pandapower version: 2.13.1 +- grid2op version: 1.9.5 +- lightsim2grid version: 0.8.1 +- lightsim2grid extra information: + + - klu_solver_available: True + - nicslu_solver_available: False + - cktso_solver_available: False + - compiled_march_native: True + - compiled_o3_optim: True + +**NB** Due to issue with dll, cktso and nicslu could not be benchmarked + +================ ====================== =================================== ============================ +case14_sandbox grid2op speed (it/s) grid2op 'backend.runpf' time (ms) solver powerflow time (ms) +================ ====================== =================================== ============================ +PP 48.1 14.9 5.16 +GS 728 0.6 0.501 +GS synch 663 0.729 0.63 +NR single (SLU) 1070 0.167 0.0673 +NR (SLU) 1050 0.172 0.0714 +NR single (KLU) 1120 0.119 0.0212 +NR (KLU) 1120 0.122 0.0237 +FDPF XB (SLU) 1100 0.136 0.0393 +FDPF BX (SLU) 1070 0.156 0.0572 +FDPF XB (KLU) 1110 0.128 0.0293 +FDPF BX (KLU) 1090 0.14 0.0424 +================ ====================== =================================== ============================ + +Differences: + +============================ ============== ============== ================ +case14_sandbox (1000 iter) Δ aor (amps) Δ gen_p (MW) Δ gen_q (MVAr) +============================ ============== ============== ================ +PP (ref) 0 0 0 +GS 0.000122 7.63e-06 7.63e-06 +GS synch 0.000122 7.63e-06 7.63e-06 +NR single (SLU) 0.000122 7.63e-06 7.63e-06 +NR (SLU) 0.000122 7.63e-06 7.63e-06 +NR single (KLU) 0.000122 7.63e-06 7.63e-06 +NR (KLU) 0.000122 7.63e-06 7.63e-06 +FDPF XB (SLU) 0.000122 7.63e-06 7.63e-06 +FDPF BX (SLU) 0.000122 7.63e-06 7.63e-06 +FDPF XB (KLU) 0.000122 7.63e-06 7.63e-06 +FDPF BX (KLU) 0.000122 7.63e-06 7.63e-06 +============================ ============== ============== ================ + +l2rpn_neurips_2020_track2_small +--------------------------------- + +Configuration: + +- date: 2024-03-27 22:28 Paris, Madrid +- system: Windows 10 +- OS: +- processor: AMD Ryzen 7 4800HS with Radeon Graphics +- python version: 3.8.3.final.0 (64 bit) +- numpy version: 1.21.0 +- pandas version: 2.0.3 +- pandapower version: 2.13.1 +- grid2op version: 1.9.5 +- lightsim2grid version: 0.8.1 +- lightsim2grid extra information: + + - klu_solver_available: True + - nicslu_solver_available: False + - cktso_solver_available: False + - compiled_march_native: True + - compiled_o3_optim: True + +===================== ====================== =================================== ============================ +neurips_2020_track2 grid2op speed (it/s) grid2op 'backend.runpf' time (ms) solver powerflow time (ms) +===================== ====================== =================================== ============================ +PP 21.2 17 6.61 +GS 6.28 158 158 +GS synch 26.8 36.1 35.9 +NR single (SLU) 616 0.716 0.583 +NR (SLU) 564 0.789 0.637 +NR single (KLU) 921 0.228 0.105 +NR (KLU) 901 0.245 0.122 +FDPF XB (SLU) 795 0.389 0.268 +FDPF BX (SLU) 783 0.414 0.293 +FDPF XB (KLU) 848 0.323 0.203 +FDPF BX (KLU) 838 0.34 0.222 +===================== ====================== =================================== ============================ + +Differences: + +================================= ============== ============== ================ +neurips_2020_track2 (1000 iter) Δ aor (amps) Δ gen_p (MW) Δ gen_q (MVAr) +================================= ============== ============== ================ +PP (ref) 0 0 0 +GS 6.1e-05 3.81e-06 1.53e-05 +GS synch 6.1e-05 3.81e-06 1.53e-05 +NR single (SLU) 6.1e-05 0 9.54e-07 +NR (SLU) 6.1e-05 0 9.54e-07 +NR single (KLU) 6.1e-05 0 9.54e-07 +NR (KLU) 6.1e-05 0 9.54e-07 +FDPF XB (SLU) 6.1e-05 1.91e-06 1.53e-05 +FDPF BX (SLU) 6.1e-05 1.91e-06 7.63e-06 +FDPF XB (KLU) 6.1e-05 1.91e-06 1.53e-05 +FDPF BX (KLU) 6.1e-05 1.91e-06 7.63e-06 +================================= ============== ============== ================ \ No newline at end of file diff --git a/docs/benchmarks.rst b/docs/benchmarks.rst index 2304f25..2ab01a8 100644 --- a/docs/benchmarks.rst +++ b/docs/benchmarks.rst @@ -326,6 +326,12 @@ The results can be found in: benchmark_solver/ubuntu_2004_server/ls0.8.1_glop1.10.0 benchmark_solver/ubuntu_2004_server/ls0.8.1_glop1.10.0_py311 +.. toctree:: + :maxdepth: 1 + :caption: For a laptop with a ryzen 7 of 2020 wth a frequency of 4.2 GHz + + benchmark_solver/windows_10_portable/ls0.8.1_glop1.9.5_py38 + Benchmarks of other lightsim2grid functions -------------------------------------------- From f3b402656ca3cdac9a973881c69a00b78ae0934f Mon Sep 17 00:00:00 2001 From: Donnot Benjamin Date: Thu, 28 Mar 2024 08:21:32 +0100 Subject: [PATCH 2/2] adding some more benchmark --- .../ls0.8.1_glop1.9.6_py38.rst | 116 ++++++++++++++++++ .../ls0.8.1_glop1.9.7_py38.rst | 112 +++++++++++++++++ 2 files changed, 228 insertions(+) create mode 100644 docs/benchmark_solver/windows_10_portable/ls0.8.1_glop1.9.6_py38.rst create mode 100644 docs/benchmark_solver/windows_10_portable/ls0.8.1_glop1.9.7_py38.rst diff --git a/docs/benchmark_solver/windows_10_portable/ls0.8.1_glop1.9.6_py38.rst b/docs/benchmark_solver/windows_10_portable/ls0.8.1_glop1.9.6_py38.rst new file mode 100644 index 0000000..61eaa2d --- /dev/null +++ b/docs/benchmark_solver/windows_10_portable/ls0.8.1_glop1.9.6_py38.rst @@ -0,0 +1,116 @@ +Lightsim2grid 0.8.1 and grid2op 1.9.6 (python 3.8) +==================================================== + +l2rpn_case14_sandbox +--------------------- + +Configuration: + +- date: 2024-03-28 07:21 Paris, Madrid +- system: Windows 10 +- OS: +- processor: AMD Ryzen 7 4800HS with Radeon Graphics +- python version: 3.8.3.final.0 (64 bit) +- numpy version: 1.21.0 +- pandas version: 2.0.3 +- pandapower version: 2.13.1 +- grid2op version: 1.9.6 +- lightsim2grid version: 0.8.1 +- lightsim2grid extra information: + + - klu_solver_available: True + - nicslu_solver_available: False + - cktso_solver_available: False + - compiled_march_native: True + - compiled_o3_optim: True + +================ ====================== =================================== ============================ +case14_sandbox grid2op speed (it/s) grid2op 'backend.runpf' time (ms) solver powerflow time (ms) +================ ====================== =================================== ============================ +PP 49 14.6 5.09 +GS 733 0.593 0.495 +GS synch 653 0.716 0.611 +NR single (SLU) 1060 0.168 0.0674 +NR (SLU) 1050 0.172 0.0715 +NR single (KLU) 1130 0.118 0.0205 +NR (KLU) 1130 0.12 0.0233 +FDPF XB (SLU) 1110 0.136 0.0393 +FDPF BX (SLU) 1080 0.155 0.0573 +FDPF XB (KLU) 1120 0.126 0.0288 +FDPF BX (KLU) 1090 0.14 0.0418 +================ ====================== =================================== ============================ + +Differences: + +============================ ============== ============== ================ +case14_sandbox (1000 iter) Δ aor (amps) Δ gen_p (MW) Δ gen_q (MVAr) +============================ ============== ============== ================ +PP (ref) 0 0 0 +GS 0.000122 7.63e-06 7.63e-06 +GS synch 0.000122 7.63e-06 7.63e-06 +NR single (SLU) 0.000122 7.63e-06 7.63e-06 +NR (SLU) 0.000122 7.63e-06 7.63e-06 +NR single (KLU) 0.000122 7.63e-06 7.63e-06 +NR (KLU) 0.000122 7.63e-06 7.63e-06 +FDPF XB (SLU) 0.000122 7.63e-06 7.63e-06 +FDPF BX (SLU) 0.000122 7.63e-06 7.63e-06 +FDPF XB (KLU) 0.000122 7.63e-06 7.63e-06 +FDPF BX (KLU) 0.000122 7.63e-06 7.63e-06 +============================ ============== ============== ================ + +l2rpn_neurips_2020_track2_small +--------------------------------- + +Configuration: + +- date: 2024-03-28 07:28 Paris, Madrid +- system: Windows 10 +- OS: +- processor: AMD Ryzen 7 4800HS with Radeon Graphics +- python version: 3.8.3.final.0 (64 bit) +- numpy version: 1.21.0 +- pandas version: 2.0.3 +- pandapower version: 2.13.1 +- grid2op version: 1.9.6 +- lightsim2grid version: 0.8.1 +- lightsim2grid extra information: + + - klu_solver_available: True + - nicslu_solver_available: False + - cktso_solver_available: False + - compiled_march_native: True + - compiled_o3_optim: True + +===================== ====================== =================================== ============================ +neurips_2020_track2 grid2op speed (it/s) grid2op 'backend.runpf' time (ms) solver powerflow time (ms) +===================== ====================== =================================== ============================ +PP 21.3 16.9 6.58 +GS 6.26 158 158 +GS synch 26.7 36.2 36 +NR single (SLU) 556 0.767 0.609 +NR (SLU) 592 0.769 0.639 +NR single (KLU) 803 0.256 0.114 +NR (KLU) 849 0.257 0.128 +FDPF XB (SLU) 717 0.416 0.278 +FDPF BX (SLU) 735 0.43 0.301 +FDPF XB (KLU) 708 0.367 0.215 +FDPF BX (KLU) 734 0.373 0.234 +===================== ====================== =================================== ============================ + +Differences: + +================================= ============== ============== ================ +neurips_2020_track2 (1000 iter) Δ aor (amps) Δ gen_p (MW) Δ gen_q (MVAr) +================================= ============== ============== ================ +PP (ref) 0 0 0 +GS 6.1e-05 3.81e-06 1.53e-05 +GS synch 6.1e-05 3.81e-06 1.53e-05 +NR single (SLU) 6.1e-05 0 9.54e-07 +NR (SLU) 6.1e-05 0 9.54e-07 +NR single (KLU) 6.1e-05 0 9.54e-07 +NR (KLU) 6.1e-05 0 9.54e-07 +FDPF XB (SLU) 6.1e-05 1.91e-06 1.53e-05 +FDPF BX (SLU) 6.1e-05 1.91e-06 7.63e-06 +FDPF XB (KLU) 6.1e-05 1.91e-06 1.53e-05 +FDPF BX (KLU) 6.1e-05 1.91e-06 7.63e-06 +================================= ============== ============== ================ diff --git a/docs/benchmark_solver/windows_10_portable/ls0.8.1_glop1.9.7_py38.rst b/docs/benchmark_solver/windows_10_portable/ls0.8.1_glop1.9.7_py38.rst new file mode 100644 index 0000000..dc96c75 --- /dev/null +++ b/docs/benchmark_solver/windows_10_portable/ls0.8.1_glop1.9.7_py38.rst @@ -0,0 +1,112 @@ +Lightsim2grid 0.8.1 and grid2op 1.9.7 (python 3.8) +==================================================== + +l2rpn_case14_sandbox +--------------------- + +Configuration: + +- date: 2024-03-28 07:56 Paris, Madrid +- system: Windows 10 +- OS: +- processor: AMD Ryzen 7 4800HS with Radeon Graphics +- python version: 3.8.3.final.0 (64 bit) +- numpy version: 1.21.0 +- pandas version: 2.0.3 +- pandapower version: 2.13.1 +- grid2op version: 1.9.7 +- lightsim2grid version: 0.8.1 +- lightsim2grid extra information: + + - klu_solver_available: True + - nicslu_solver_available: False + - cktso_solver_available: False + - compiled_march_native: True + - compiled_o3_optim: True + +================ ====================== =================================== ============================ +case14_sandbox grid2op speed (it/s) grid2op 'backend.runpf' time (ms) solver powerflow time (ms) +================ ====================== =================================== ============================ +PP 49.4 14.5 5.04 +GS 734 0.591 0.492 +GS synch 676 0.704 0.605 +NR single (SLU) 1060 0.166 0.0663 +NR (SLU) 1050 0.172 0.0715 +NR single (KLU) 1130 0.118 0.0202 +NR (KLU) 1120 0.122 0.023 +FDPF XB (SLU) 1090 0.138 0.0388 +FDPF BX (SLU) 1090 0.153 0.0556 +FDPF XB (KLU) 1120 0.126 0.0283 +FDPF BX (KLU) 1100 0.138 0.0411 +================ ====================== =================================== ============================ + +============================ ============== ============== ================ +case14_sandbox (1000 iter) Δ aor (amps) Δ gen_p (MW) Δ gen_q (MVAr) +============================ ============== ============== ================ +PP (ref) 0 0 0 +GS 0.000122 7.63e-06 7.63e-06 +GS synch 0.000122 7.63e-06 7.63e-06 +NR single (SLU) 0.000122 7.63e-06 7.63e-06 +NR (SLU) 0.000122 7.63e-06 7.63e-06 +NR single (KLU) 0.000122 7.63e-06 7.63e-06 +NR (KLU) 0.000122 7.63e-06 7.63e-06 +FDPF XB (SLU) 0.000122 7.63e-06 7.63e-06 +FDPF BX (SLU) 0.000122 7.63e-06 7.63e-06 +FDPF XB (KLU) 0.000122 7.63e-06 7.63e-06 +FDPF BX (KLU) 0.000122 7.63e-06 7.63e-06 +============================ ============== ============== ================ + +l2rpn_neurips_2020_track2_small +--------------------------------- + +Configuration: + +- date: 2024-03-28 08:15 Paris, Madrid +- system: Windows 10 +- OS: +- processor: AMD Ryzen 7 4800HS with Radeon Graphics +- python version: 3.8.3.final.0 (64 bit) +- numpy version: 1.21.0 +- pandas version: 2.0.3 +- pandapower version: 2.13.1 +- grid2op version: 1.9.7 +- lightsim2grid version: 0.8.1 +- lightsim2grid extra information: + + - klu_solver_available: True + - nicslu_solver_available: False + - cktso_solver_available: False + - compiled_march_native: True + - compiled_o3_optim: True + +===================== ====================== =================================== ============================ +neurips_2020_track2 grid2op speed (it/s) grid2op 'backend.runpf' time (ms) solver powerflow time (ms) +===================== ====================== =================================== ============================ +PP 21.4 16.9 6.57 +GS 6.31 157 157 +GS synch 26.7 36.3 36.1 +NR single (SLU) 607 0.729 0.595 +NR (SLU) 593 0.769 0.635 +NR single (KLU) 902 0.233 0.107 +NR (KLU) 885 0.25 0.123 +FDPF XB (SLU) 808 0.384 0.267 +FDPF BX (SLU) 770 0.419 0.297 +FDPF XB (KLU) 838 0.324 0.205 +FDPF BX (KLU) 805 0.348 0.226 +===================== ====================== =================================== ============================ + +================================= ============== ============== ================ +neurips_2020_track2 (1000 iter) Δ aor (amps) Δ gen_p (MW) Δ gen_q (MVAr) +================================= ============== ============== ================ +PP (ref) 0 0 0 +GS 6.1e-05 3.81e-06 1.53e-05 +GS synch 6.1e-05 3.81e-06 1.53e-05 +NR single (SLU) 6.1e-05 0 9.54e-07 +NR (SLU) 6.1e-05 0 9.54e-07 +NR single (KLU) 6.1e-05 0 9.54e-07 +NR (KLU) 6.1e-05 0 9.54e-07 +FDPF XB (SLU) 6.1e-05 1.91e-06 1.53e-05 +FDPF BX (SLU) 6.1e-05 1.91e-06 7.63e-06 +FDPF XB (KLU) 6.1e-05 1.91e-06 1.53e-05 +FDPF BX (KLU) 6.1e-05 1.91e-06 7.63e-06 +================================= ============== ============== ================ \ No newline at end of file