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 #32

Merged
merged 6 commits into from
Apr 2, 2024
Merged

Final switch to IMASDD #32

merged 6 commits into from
Apr 2, 2024

Commits on Mar 29, 2024

  1. Final switch to IMASDD

    * All references to OMAS have been removed now.
    * All tests pass with IMASDD.
    * Minor changes in edge and cell initialization was required.
    anchal-physics committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    9321589 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f753e28 View commit details
    Browse the repository at this point in the history
  3. Speeding up by reducing calls to get_property

    It was identified that majority of time is spent in get_property calls
    made due search_points and search_edges. Ithis commit reduces these
    calls by making a single clal per iteration of loop and storing the
    result in a temporary variable. This improved the speed by a factor of
    about 2.
    
    Before commit
    SOLPS2IMAS.jl % julia --project test/speedtest.jl
    -----------------------------------------------------------------------------
    solps2imas(b2gmtry, b2output; b2mn=b2mn, fort=fort) time with compilation: 139.745324 seconds (433.19 M allocations: 16.150 GiB, 4.25% gc time, 40.88% compilation time: <1% of which was recompilation)
    solps2imas(b2gmtry, b2output; b2mn=b2mn, fort=fort) time (true runtime):  74.138648 seconds (267.65 M allocations: 4.938 GiB, 2.12% gc time, 0.02% compilation time)
    
    After commit
    
    SOLPS2IMAS.jl % julia --project test/speedtest.jl
    -----------------------------------------------------------------------------
    solps2imas(b2gmtry, b2output; b2mn=b2mn, fort=fort) time with compilation: 139.745324 seconds (433.19 M allocations: 16.150 GiB, 4.25% gc time, 40.88% compilation time: <1% of which was recompilation)
    solps2imas(b2gmtry, b2output; b2mn=b2mn, fort=fort) time (true runtime):  74.138648 seconds (267.65 M allocations: 4.938 GiB, 2.12% gc time, 0.02% compilation time)
    anchal-physics committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    834b67a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ef9b951 View commit details
    Browse the repository at this point in the history
  5. revert speedtest

    orso82 authored and anchal-physics committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    0ea80e9 View commit details
    Browse the repository at this point in the history
  6. Using custom deepcopy_subset for faster deepcopy

    After last commits, it was found that deepcopy of the grid_subsets
    done when triangular mesh is read is taking up about half of the
    computation time of solps2imas(). This is because deepcopy has
    to go through the deep grid_subset strucutre calling get_property at
    every instance.
    This commit uses custom deepcopy_subset function which is aware of
    the fields inside grid_subset and uses getfield() for faster access
    to items for creating deepcopy at julia base type level. This function
    has been added in GGDutils.jl/subset_tools.jl at ProjectTorreyPines/IMASggd.jl@3ebbf8f
    
    With this change, the speed has improved by a factor of 2.5. deepcopy is
    not a major bottleneck anymore.
    anchal-physics committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    624f383 View commit details
    Browse the repository at this point in the history