Closed Horymir001 closed 1 year ago
This is an interesting feature that has been suggested before for ionized electrons.
It could be useful to have a specific diagnostic for this purpose, but it is not necessarily easy.
If you plan on implementing such a new diagnostic, I suggest you look into dynamicsImportParticles
.
Are you planning on working on this issue? If yes, I suggest we talk a bit about the details. This is not an easy task
Hi, unfortunately not in the very near future. Later we will see.
Ok maybe I can figure it out then
Dear Smilei developers 😃, We would be very interested in this new feature/diag in Smilei, particularly for the simulations of ionisation injection in the laser wakefield accelerator. We are ready to beta-test. All the best, K.
I have done this locally. Still needs a few tweaks to be ready for testing.
The develop branch now has an experimental version of this diagnostic, called NewParticles
.
You can get info in the documentation that is included in the repository. Use make doc
and open the local file usually in build/html/index.html
.
Hello, many thanks for this new feature, we are starting test ! We are facing issue I think with H5 when compiling on Irene Joliot Curie SKL :
build/src/Diagnostic/DiagnosticNewParticles.o: In function `DiagnosticNewParticles::writeOther(VectorPatch&, unsigned long, H5Space*, H5Space*)':
.../Smilei/src/Diagnostic/DiagnosticNewParticles.cpp:237: undefined reference to `void DiagnosticParticleList::fill_buffer<double>(VectorPatch&, unsigned long, std::vector<double, std::allocator<double> >&)'
make: *** [makefile:330: smilei] Error 1
I don't if it matters but we got warning when loading hf5 module
load module flavor/hdf5/parallel (HDF5 flavor)
WARNING: the loaded flavor/hdf5/parallel does not exists, so flavor/hdf5/parallel intel--20.0.2__openmpi--4.0.1/parallel is used instead
Any idea ?
thanks
For the first bug, it is related to the Intel compiler, and it is fixed now.
The second part is probably due to a change of libraries on irene. Try it out, we will see if an update of the machine file is necessary
Hello!
I am also testing the new diagnostic. After downloading and compiling the development version, I tried to run a simulation but got the following error:
Initializing Patches
--------------------------------------------------------------------------------
First patch created
All patches created
[login4:64458:0:64458] Caught signal 11 (Segmentation fault: address not mapped to object at address 0x168)
/apps/all/GCCcore/9.3.0/include/c++/9.3.0/bits/stl_vector.h: [ std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >::size() ]
...
913 size_type
914 size() const _GLIBCXX_NOEXCEPT
915 { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
==> 916
917 /** Returns the size() of the largest possible %vector. */
918 size_type
919 max_size() const _GLIBCXX_NOEXCEPT
==== backtrace (tid: 64458) ====
0 0x0000000000020ba3 ucs_debug_print_backtrace() /dev/shm/easybuild/build/UCX/1.9.0/GCCcore-9.3.0/ucx-1.9.0/src/ucs/debug/debug.c:656
1 0x000000000098402b std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >::size() /apps/all/GCCcore/9.3.0/include/c++/9.3.0/bits/stl_vector.h:916
2 0x000000000098402b AsyncMPIbuffers::defineTags() /home/it4i-bgdnc5/Smilei-develop/src/SmileiMPI/AsyncMPIbuffers.cpp:38
3 0x0000000000863c10 VectorPatch::updateFieldList() /home/it4i-bgdnc5/Smilei-develop/src/Patch/VectorPatch.cpp:3510
4 0x0000000000982364 PatchesFactory::createVector() /home/it4i-bgdnc5/Smilei-develop/src/Patch/PatchesFactory.h:116
5 0x0000000000980e30 executeTestMode() /home/it4i-bgdnc5/Smilei-develop/src/Smilei.cpp:715
6 0x000000000097d19d main() /home/it4i-bgdnc5/Smilei-develop/src/Smilei.cpp:121
7 0x0000000000022555 __libc_start_main() ???:0
8 0x00000000004853e9 _start() ???:0
=================================
Stack trace (most recent call last):
#7 Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in
#6 Object "/home/it4i-bgdnc5/Smilei-develop/smilei_test", at 0x4853e8, in
#5 Object "/lib64/libc.so.6", at 0x2b2c7304e554, in __libc_start_main
#4 Object "/home/it4i-bgdnc5/Smilei-develop/smilei_test", at 0x97d19c, in main
#3 Object "/home/it4i-bgdnc5/Smilei-develop/smilei_test", at 0x980e2f, in executeTestMode(VectorPatch&, Region&, SmileiMPI*, SimWindow*, Params&, Checkpoint&, OpenPMDparams&, RadiationTables*)
#2 Object "/home/it4i-bgdnc5/Smilei-develop/smilei_test", at 0x982363, in PatchesFactory::createVector(VectorPatch&, Params&, SmileiMPI*, OpenPMDparams&, RadiationTables*, unsigned int, unsigned int)
#1 Object "/home/it4i-bgdnc5/Smilei-develop/smilei_test", at 0x863c0f, in VectorPatch::updateFieldList(SmileiMPI*)
#0 Object "/home/it4i-bgdnc5/Smilei-develop/smilei_test", at 0x98402b, in AsyncMPIbuffers::defineTags(Patch*, SmileiMPI*, int)
Segmentation fault (Signal sent by tkill() [0x22810000fbca])
Segmentation fault (core dumped)
It looks like you tried the test mode? I will need to check whether the test mode was broken by the new diagnostic
Actually it might just be an issue with test mode, I quickly ran a low resolution version of this input file and it worked. Will try a normal run now and see what happens.
I cannot reproduce any error in test mode. If you have an example that fails, please attach it. Note that the test mode should not be run in parallel.
So the full simulation ran with no problems.
The new diagnostic looks good so far. I compared the output with a similar setup I was working on with @Horymir001 using another code and the result are quite close (only differences come from the different initial conditions).
One minor issue is that it doesn't automatically convert to "real" units by setting the "units" list, however it's straightforward to do the conversion afterwards. For now I only tested for inverse Compton photons (no ionization electrons or B.-W. pair production), but the diagnostic does what is expected.
Regarding the test mode problem, I am almost certain it is a machine-related issue. I will try to run it on other systems when I have more time, but for now my workaround is to use the old test mode executable without the new diagnostic block or run a fast low resolution test.
Thank you for the quick response to this request by the way, it is a very useful new feature :)
Ok so if you find any bug in this feature feel free to open another issue
@kevinCassou I am curious to know whether this works for you
Hello again.
Would it be possible to also include in this diagnostic the ID of the parent particle? It would be very helpful to get a more detailed look at the emission process.
Dear developers,
I suggest adding a new feature for synchrotron radiation analysis after laser interaction with solids. To enhance brightness calculation accuracy, it would be valuable to obtain the time, positions, and momenta of newly generated photons.
Currently, utilizing the TrackParticles diagnostics results in excessive data, slower runtime, and complicated processing. I propose two potential solutions:
Implementing either approach would significantly improve calculation precision and efficiency.
Thank you for considering my suggestion.
Best regards, Vojtěch