diff options
author | 2020-03-02 09:26:45 -0800 | |
---|---|---|
committer | 2020-03-02 09:26:45 -0800 | |
commit | c8b1d2175fce8eb8c98933fb5729840e7f8e8f45 (patch) | |
tree | 6950969aff23b7302d8a5bd4066c00b8a7ea0a77 /Source/Utils/WarpXAlgorithmSelection.cpp | |
parent | 04bd921d5d33a0391f55915b1839d0edbf7de190 (diff) | |
download | WarpX-c8b1d2175fce8eb8c98933fb5729840e7f8e8f45.tar.gz WarpX-c8b1d2175fce8eb8c98933fb5729840e7f8e8f45.tar.zst WarpX-c8b1d2175fce8eb8c98933fb5729840e7f8e8f45.zip |
Heuristic load balance based on number of particles and number of cells (#737)
* Issue #713: Load Balance w.r.t. number of cells + particles
README: Update Badged to `master` (#725)
* README: Update Badged to `master`
Update the badges to check the `master` branch as development branch.
* Docs: More dev->master updates
- release workflow
- contribution guide link
Galilean PSATD with shift (#704)
* Read Galilean velocity
* Prepare structures for Galilean solver
* Started implementing Galilean equations
* Analytical limits for X1, X2, X3, X4 coefficients added
* Slight changes added
* Added Galilean position pusher
* Scale galilean velocity
* Remove unneeded Abort
* Fix Galilean pusher
* Allocate Theta2 array
* Fix definition of coefficients
* Increase guard cells for Galilean
* Add guard cell in particle exchange
* Type corrected
* v_gal added to warpx_current_deposition
* v_gal added to WarpXParticleContainer.H
* Bug fixed - update particle x-position over one time step
* Fix issues with merge from dev
* Preparation for merging dev into galilean.
* Adding galilean shift
* Implemented galilean shift
* Changed method's name from GalileanShift to ShiftGalileanBoundary
* Added doxygen string for ShiftGalileanBoundary
* Removed never used method LowerCornerWithCentering
* Removed temporary comments
* Removed dt as a variable from DepositCharge method and its dependencies
* Converted tab to spaces
* Removed EOL white space
* Add documentation and automated tests
* Fix compilation error
* Add automated test
* Update automated test
* Removed temporary used galilean shift
* Removed temporary used particle's push for Galilean PSATD
* Removed unused statement
* Remove EOL white space.
* Added zero shift for LowerCorner in RZ geometry
* Minor changes to Galilean implementation
* Modifications for GPU
* Fix typo
Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
[mini-PR] when a cufft error occurs, print a meaningful error message (#728)
* added method to translate cufft errors
* fixed style
* bug fixing
avoid duplicate tests and plot less often (#726)
* avoid duplicate tests and plot less often
* fix tests I broke when trying to save plotfiles
doc install yt on Summit (#729)
* doc install yt on Summit
* eol
Do not use local Redistribute for electrostatic solver (#731)
Add Reset Random Seed Feature (#717)
* Add ResetRandomSeed
* Add doc
* Modify and change location of the code.
* Small fix
* Try to fix an alert
* Try to fix an alert
* Modify based on suggestions
* Use INT_MAX
* Modify based on suggestions.
* Modify based on suggestions.
openPMD: warn if step is already written (#718)
* making sure iterations are written at most once.
* prints a warning when iteration is written more than once
writting is not stopped
* Fixed tabs
* included <iostream> as requested by Axel
Minor refactoring of space-charge calculation (#732)
Improve clarity and documentation
Minor
Update GNUmakefile
Update based on comments
Update GNU Makefile
Formatting
Formatting
Formatting
Formatting
Remove unneeded function
Removed unneeded function
Formatting
Formatting
Formatting
Whitespace
Minor
Formatting
Formatting
Formatting
Formatting
Formatting
Formatting
Formatting
whitespace
Formatting
Minor
Formatting
Remove unneeded template function
Change import
Minor
Formatting
Remove unused variable
Formatting
Update Source/WarpX.H
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
Update Source/Parallelization/WarpXRegrid.cpp
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
Remove `n_particles` and `n_cells`
Update Source/WarpX.H
Co-Authored-By: MaxThevenet <mthevenet@lbl.gov>
Revert clear costs in case of edge case
Update to use new load_balance_api in AMReX
Tabs
Minor
* minor: indentation in Source/WarpX.H
Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
Diffstat (limited to 'Source/Utils/WarpXAlgorithmSelection.cpp')
-rw-r--r-- | Source/Utils/WarpXAlgorithmSelection.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/Utils/WarpXAlgorithmSelection.cpp b/Source/Utils/WarpXAlgorithmSelection.cpp index 54eff8d01..066353222 100644 --- a/Source/Utils/WarpXAlgorithmSelection.cpp +++ b/Source/Utils/WarpXAlgorithmSelection.cpp @@ -52,6 +52,12 @@ const std::map<std::string, int> gathering_algo_to_int = { {"default", GatheringAlgo::EnergyConserving } }; +const std::map<std::string, int> load_balance_costs_update_algo_to_int = { + {"timers", LoadBalanceCostsUpdateAlgo::Timers }, + {"heuristic", LoadBalanceCostsUpdateAlgo::Heuristic }, + {"default", LoadBalanceCostsUpdateAlgo::Timers } +}; + int GetAlgorithmInteger( amrex::ParmParse& pp, const char* pp_search_key ){ @@ -74,13 +80,15 @@ GetAlgorithmInteger( amrex::ParmParse& pp, const char* pp_search_key ){ algo_to_int = charge_deposition_algo_to_int; } else if (0 == std::strcmp(pp_search_key, "field_gathering")) { algo_to_int = gathering_algo_to_int; + } else if (0 == std::strcmp(pp_search_key, "load_balance_costs_update")) { + algo_to_int = load_balance_costs_update_algo_to_int; } else { std::string pp_search_string = pp_search_key; amrex::Abort("Unknown algorithm type: " + pp_search_string); } // Check if the user-input is a valid key for the dictionary - if (algo_to_int.count(algo) == 0){ + if (algo_to_int.count(algo) == 0) { // Not a valid key ; print error message std::string pp_search_string = pp_search_key; std::string error_message = "Invalid string for algo." + pp_search_string |