Segmentation Fault during 2D Charge Deposition
I have been experiencing a segmentation fault when running my simulation. Recompiling QuickPIC with debug information shows an invalid array access in the function PPGPPOST2L in part2d_lib77.f:
https://github.com/UCLA-Plasma-Simulation-Group/QuickPIC-OpenSource/blob/2982d7a67c42542bb131f4fc1b37a918289c71e0/source/part2d_lib77.f#L257
Print debugging shows values of nn and mm both less than 1 and greater than the length of the array. My input file is below:
Hello, I think the issue may be caused by the super large beam density (and thus a very high beam current) you used. If the beam current is too large, the background electrons will be accelerated to a relatively large gamma when they flow to the back of the wake bubble. Therefore, the "effective" time step of these plasma particles, which is defined as dt*gamma/(gamma-pz) in the quasi-static approximation (QSA), may become tremendously huge so that it crashes the simulation run. Unfortunately this is a long-standing issue in QuickPIC and other QSA PIC codes, and we don't expect to resolve it in the foreseeable future. If you have to simulate such a high beam current, there is a workaround. Since the plasma particles crashing the codes appearing at the very rear of the bubble, you may shorten the simulation window a little bit to truncate before those particles reaching the very rear of the bubble. Hope this helps.
Fei
This is a charge deposit routine. nn, mm is a local temporary variable used in various places. But the most likely place would be in do loop 30, and the most likely cause is particles in array ppart being out of bounds. Do you know exactly what line this failed in and what array is involved?
viktor decyk
On Jul 6, 2020, at 2:07 PM, Claire Hansel [email protected] wrote:
I have been experiencing a segmentation fault when running my simulation. Recompiling QuickPIC with debug information shows an invalid array access in the function PPGPPOST2L in part2d_lib77.f:
https://github.com/UCLA-Plasma-Simulation-Group/QuickPIC-OpenSource/blob/2982d7a67c42542bb131f4fc1b37a918289c71e0/source/part2d_lib77.f#L257 https://github.com/UCLA-Plasma-Simulation-Group/QuickPIC-OpenSource/blob/2982d7a67c42542bb131f4fc1b37a918289c71e0/source/part2d_lib77.f#L257 Print debugging shows values of nn and mm both less than 1 and greater than the length of the array. My input file is below:
qpinput.txt https://github.com/UCLA-Plasma-Simulation-Group/QuickPIC-OpenSource/files/4881215/qpinput.txt — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/UCLA-Plasma-Simulation-Group/QuickPIC-OpenSource/issues/31, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRRZUVBQVVK6PGOM5VOBQLR2I4KBANCNFSM4OR66R7A.