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

Use 63 bits for Beam ID #1090

Merged

Conversation

AlexanderSinn
Copy link
Member

@AlexanderSinn AlexanderSinn commented Mar 27, 2024

In this PR, 63 bits of the idcpu component are used to store the id, instead of the 40 bits dedicated for the id. What previously was in the cpu component, the MR level, is now stored in a new component mr_level that does not need to be communicated with MPI.

This will prevent the ID from looping around if there are more than 2^31 particles.

Test with 3*10^9 Gaussian particles (180GB beam output per time step); openPMD iteration 7:

id.shape=(2999630696,)
id[:100]=array([  1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,
        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,
        27,  28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,
        40,  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,
        53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,  64,  65,
        66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,  78,
        79,  80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,  91,
        92,  93,  94,  95,  96,  97,  98,  99, 100], dtype=uint64)
id[-100:]=array([2999630597, 2999630598, 2999630599, 2999630600, 2999630601,
       2999630602, 2999630603, 2999630604, 2999630605, 2999630606,
       2999630607, 2999630608, 2999630609, 2999630610, 2999630611,
       2999630612, 2999630613, 2999630614, 2999630615, 2999630616,
       2999630617, 2999630618, 2999630619, 2999630620, 2999630621,
       2999630622, 2999630623, 2999630624, 2999630625, 2999630626,
       2999630627, 2999630628, 2999630629, 2999630630, 2999630631,
       2999630632, 2999630633, 2999630634, 2999630635, 2999630636,
       2999630637, 2999630638, 2999630639, 2999630640, 2999630641,
       2999630642, 2999630643, 2999630644, 2999630645, 2999630646,
       2999630647, 2999630648, 2999630649, 2999630650, 2999630651,
       2999630652, 2999630653, 2999630654, 2999630655, 2999630656,
       2999630657, 2999630658, 2999630659, 2999630660, 2999630661,
       2999630662, 2999630663, 2999630664, 2999630665, 2999630666,
       2999630667, 2999630668, 2999630669, 2999630670, 2999630671,
       2999630672, 2999630673, 2999630674, 2999630675, 2999630676,
       2999630677, 2999630678, 2999630679, 2999630680, 2999630681,
       2999630682, 2999630683, 2999630684, 2999630685, 2999630686,
       2999630687, 2999630688, 2999630689, 2999630690, 2999630691,
       2999630692, 2999630693, 2999630694, 2999630695, 2999630696],
      dtype=uint64)
  • Small enough (< few 100s of lines), otherwise it should probably be split into smaller PRs
  • Tested (describe the tests in the PR description)
  • Runs on GPU (basic: the code compiles and run well with the new module)
  • Contains an automated test (checksum and/or comparison with theory)
  • Documented: all elements (classes and their members, functions, namespaces, etc.) are documented
  • Constified (All that can be const is const)
  • Code is clean (no unwanted comments, )
  • Style and code conventions are respected at the bottom of https://github.com/Hi-PACE/hipace
  • Proper label and GitHub project, if applicable

@AlexanderSinn AlexanderSinn added component: beam About the beam species component: diagnostics About any types of diagnostics labels Mar 27, 2024
@MaxThevenet MaxThevenet merged commit dceab91 into Hi-PACE:development Apr 8, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: beam About the beam species component: diagnostics About any types of diagnostics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants