Open SeaWolfYFZ opened 1 week ago
CPU usage with PrescribedField
Module
Hi
The prescribed fields are known to have bad performance. This is not a bug but related to the fact that the whole profile must be retrieved at every timestep. Maybe we will someday parallelize the python profile calculation, but this is a longer term work, with a wider scope than prescribed fields.
In your case the performance is already poor, even without prescribed fields. I advise that you first try to improve performance in general, then make a prescribed profile that is numpy-vectorisable
Now, your error with the constant profile is not a bug. This is a spatial profile but prescribed fields require a spatio-temporal profile.
Your segfault with interpolator is strange. Do you mean that it does not occur with python 3.9? Can you provide the text of this error?
Description
PrescribedField
Module. I am experiencing performance degradation when using thePrescribedField
module to simulate an external uniform magnetic field in a 3D cartesian geometry setup with Smilei. Specifically, when I use the following configuration:The simulation runs significantly slower, and the CPU usage does not increase as expected, suggesting that numpy array operations are not being utilized efficiently for updating the 3D electromagnetic grid.
Computational Speed with and without
PrescribedField
Module:with
PrescribedField
Modulewithout
PrescribedField
ModulePrescribedField
Module. I attempt to use a Pre-defined spatial profiles, like so:I encounter an error indicating that:
Steps to reproduce the problem
Segmentation Fault with ParticleInjector Module: Additionally, when using the
ParticleInjector
module in Ubuntu 24.04.1 LTS with the default Python 3.12.3 installation, I encounter a segmentation fault. To resolve this, I installed a lower version of Python using Miniconda in a virtual environment.Following the documentation, I first installed the necessary compilers and libraries:
Then, I created a virtual environment using Miniconda:
Next, I configured the environment:
Finally, I compiled the code:
Run the code:
Parameters
./smilei ./sim_namelist.py
Namelist