Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final switch to IMASDD #41

Merged
merged 5 commits into from
Apr 2, 2024
Merged

Final switch to IMASDD #41

merged 5 commits into from
Apr 2, 2024

Conversation

anchal-physics
Copy link
Collaborator

@anchal-physics anchal-physics commented Mar 25, 2024

This PR would be merged simultaneously when all other repos also have the PR ready for the final switch from OMAS to IMASDD.

Speed test

I ran a speed test to check the difference between using OMAS and IMASDD. Following are the results:

Speed test with IMASDD.jl

Note: It actually took more than 30s for the first json2imas run to happen even though the test time says 2.9s. This was not the case with OMAS.jl

GGDUtils.jl % julia --project test/speedtest.jl
-----------------------------------------------------------------------------
json2imas() time with compilation:   2.982690 seconds (18.02 M allocations: 1.032 GiB, 8.14% gc time, 59.54% compilation time)
json2imas() time (true runtime):   1.153058 seconds (13.69 M allocations: 756.112 MiB, 10.58% gc time)
-----------------------------------------------------------------------------
interp(prop, grid_ggd) time with compilation:   1.956376 seconds (4.60 M allocations: 499.210 MiB, 5.92% gc time, 59.11% compilation time)
interp(prop, grid_ggd) (true runtime):   0.726695 seconds (24.00 k allocations: 189.102 MiB)
-----------------------------------------------------------------------------
interp(prop_arr, space, subset) time with compilation:   0.751548 seconds (38.73 k allocations: 190.108 MiB, 5.01% gc time, 1.73% compilation time)
interp(prop_arr, space, subset) time (true runtime):   0.695903 seconds (24.00 k allocations: 189.102 MiB)
-----------------------------------------------------------------------------
interp(prop_arr, grid_ggd, grid_subset_index) time with compilation:   0.707414 seconds (31.30 k allocations: 189.605 MiB, 3.46% gc time, 1.35% compilation time)
interp(prop_arr, grid_ggd, grid_subset_index) time (true runtime):   0.677612 seconds (24.00 k allocations: 189.102 MiB)
-----------------------------------------------------------------------------
interp(prop_arr, kdtree) time with compilation:   0.003525 seconds (2.54 k allocations: 185.007 KiB, 98.85% compilation time)
interp(prop_arr, kdtree) time (true runtime):   0.000014 seconds (3 allocations: 208 bytes)
-----------------------------------------------------------------------------
project_prop_on_subset!(prop, from_subset, to_subset, space) time with compilation:   0.906076 seconds (610.83 k allocations: 228.834 MiB, 2.48% gc time, 24.22% compilation time)
project_prop_on_subset!(prop, from_subset, to_subset, space) time (true runtime):   0.728945 seconds (24.80 k allocations: 189.121 MiB)
-----------------------------------------------------------------------------
project_prop_on_subset!(prop, from_subset, subset_core) time with compilation:   0.086926 seconds (67.38 k allocations: 4.142 MiB, 94.34% compilation time)
project_prop_on_subset!(prop, from_subset, subset_core) time (true runtime):   0.004439 seconds (9.23 k allocations: 268.242 KiB)
-----------------------------------------------------------------------------
test ∈ (edges) time with compilation:   0.415590 seconds (689.22 k allocations: 45.141 MiB, 6.06% gc time, 99.96% compilation time)
test ∈ (edges) time (true runtime):   0.000140 seconds (358 allocations: 5.609 KiB)
test ∈ (cells) time with compilation:   0.025712 seconds (96.42 k allocations: 58.247 MiB)
test ∈ (cells) time (true runtime):   0.028640 seconds (96.42 k allocations: 58.247 MiB)

Speed test with OMAS.jl

GGDUtils.jl % julia --project test/speedtest.jl
-----------------------------------------------------------------------------
json2imas() time with compilation:   1.059673 seconds (4.59 M allocations: 304.447 MiB, 7.67% gc time, 70.66% compilation time)
json2imas() time (true runtime):   0.285278 seconds (3.55 M allocations: 237.208 MiB, 19.83% gc time)
-----------------------------------------------------------------------------
interp(prop, grid_ggd) time with compilation:   1.426089 seconds (3.16 M allocations: 401.966 MiB, 4.08% gc time, 51.01% compilation time)
interp(prop, grid_ggd) (true runtime):   0.730526 seconds (36 allocations: 188.736 MiB, 2.22% gc time)
-----------------------------------------------------------------------------
interp(prop_arr, space, subset) time with compilation:   0.747122 seconds (7.72 k allocations: 189.240 MiB, 0.91% gc time, 0.80% compilation time)
interp(prop_arr, space, subset) time (true runtime):   0.707098 seconds (36 allocations: 188.736 MiB, 0.91% gc time)
-----------------------------------------------------------------------------
interp(prop_arr, grid_ggd, grid_subset_index) time with compilation:   0.721112 seconds (5.61 k allocations: 189.101 MiB, 0.59% gc time, 1.53% compilation time)
interp(prop_arr, grid_ggd, grid_subset_index) time (true runtime):   0.742427 seconds (36 allocations: 188.736 MiB, 0.49% gc time)
-----------------------------------------------------------------------------
interp(prop_arr, kdtree) time with compilation:   0.005018 seconds (2.55 k allocations: 185.788 KiB, 99.19% compilation time)
interp(prop_arr, kdtree) time (true runtime):   0.000007 seconds (2 allocations: 192 bytes)
-----------------------------------------------------------------------------
project_prop_on_subset!(prop, from_subset, to_subset, space) time with compilation:   0.894506 seconds (560.49 k allocations: 226.567 MiB, 0.97% gc time, 21.91% compilation time)
project_prop_on_subset!(prop, from_subset, to_subset, space) time (true runtime):   0.774586 seconds (358 allocations: 188.748 MiB, 1.09% gc time)
-----------------------------------------------------------------------------
project_prop_on_subset!(prop, from_subset, subset_core) time with compilation:   0.059059 seconds (54.65 k allocations: 3.645 MiB, 97.04% compilation time)
project_prop_on_subset!(prop, from_subset, subset_core) time (true runtime):   0.001545 seconds (1.71 k allocations: 150.570 KiB)
-----------------------------------------------------------------------------
test ∈ (edges) time with compilation:   0.000013 seconds (1 allocation: 32 bytes)
test ∈ (edges) time (true runtime):   0.000005 seconds (1 allocation: 32 bytes)
test ∈ (cells) time with compilation:   0.030012 seconds (66.11 k allocations: 57.694 MiB, 32.54% gc time)
test ∈ (cells) time (true runtime):   0.020011 seconds (66.11 k allocations: 57.694 MiB)

* All references to OMAS have been removed now.
* All tests pass with IMASDD and all exmaples run.
@anchal-physics anchal-physics changed the title WIP: Final switch to IMASDD Final switch to IMASDD Apr 1, 2024
@anchal-physics anchal-physics merged commit db59484 into dev Apr 2, 2024
1 check passed
@eldond eldond deleted the omas_imas branch April 2, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants