Hi everyone!
This is my first post in the ROOT community and I want to thank you all for the help I get by reading the forum for years.
Now I success installing Garfieldpp on Archlinux from source, then when I run the example gem.c the simulation starts, it opens the ROOT visual interface too, but just after some seconds I got this strange C++ error:
The previous lines contains - I think - the correct output of gem.c.
I tried searching online but I didn’t find anything helpful.
Do you know how I can solve this? Thank you!
Thank you @silverweed! The following are the output line of gem.c:
~/Documents/MC/Garfield Examples/Gem/build]$ ./gem
MediumMagboltz::SetComposition: Ar/CO2 (80/20)
MediumMagboltz::Mixer:
4000 linear energy steps between 0 and 40 eV.
ARGON ANISOTROPIC 2014
mass: 39.948 amu
ionisation threshold: 15.7596 eV
44 inelastic terms (44 excitations, 0 superelastic, 0 other)
CO2 2018 ANISOTROPIC
mass: 44.0095 amu
ionisation threshold: 13.776 eV
144 inelastic terms (0 excitations, 35 superelastic, 109 other)
MediumMagboltz::Mixer:
Lowest ionisation threshold in the mixture: 13.776 eV (CO2)
MediumMagboltz::Mixer:
Energy [eV] Collision Rate [ns-1]
2.50 1068.85
7.50 2892.41
12.50 5363.62
17.50 8777.02
22.50 11300.56
27.50 12660.82
32.50 12521.53
37.50 12101.91
MediumMagboltz::ComputePhotonCollisionTable:
Energy [eV] Mean free path [um]
1.00 ------------
3.00 ------------
5.00 ------------
7.00 288302.9619
9.00 3279.0615
11.00 23.1076
13.00 31.4118
15.00 145.1898
17.00 13.2429
19.00 11.1775
MediumMagboltz::EnablePenningTransfer:
Warning: present gas table has no ionisation rates.
Ignore this message if you are using microscopic tracking only.
MediumMagboltz::EnablePenningTransfer:
Penning transfer probability for 44 Ar excitation levels set to r = 0.51
MediumMagboltz::LoadMobility:
Read 36 values from file /home/okabe/garfield/install/share/Garfield/Data/IonMobility_Ar+_Ar.txt
ComponentAnsys123::Initialise:
Read properties of 3 materials from file MPLIST.lis.
Read 8758 elements from file ELIST.lis.
Highest node number: 14066
Background elements skipped: 0
Read 14066 nodes from file NLIST.lis.
Read 14066 potentials from file PRNSOL.lis.
ComponentAnsys123::Prepare:
Caching the bounding boxes of all elements... done.
Initialized tetrahedral tree.
ComponentAnsys123::PrintRange:
Dimensions of the elementary block
0 < x < 0.007 cm,
0 < y < 0.0121244 cm,
-0.1 < z < 0.1 cm,
-200 < V < 350 V.
Periodicities
x: mirror with length 0.007 cm
y: mirror with length 0.0121244 cm
z: none
ComponentAnsys123::SetGas: Associating material 1 with Ar/CO2.
ComponentAnsys123::PrintMaterials:
Currently 3 materials are defined.
Index Permittivity Resistivity Notes
0 1e+10 0
1 1 -1 Ar/CO2, drift medium, ionisable (drift medium)
2 4 -1
/usr/include/c++/14.2.1/bits/stl_vector.h:1130: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = double; _Alloc = std::allocator<double>; reference = double&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
[1] 468606 IOT instruction (core dumped) ./gem
I am using ArchLinux with KDE Plasma (Wayland, not X11 if ti has something to do with it) on a Dell laptop.
CPU: 11th Gen Intel(R) Core™ i7-11800H
GPU: NVIDIA RTX 3050Ti Laptop
I’ve used ROOT and Geant4 for months without any problem. Geant4 and Garifled are source installed, while ROOT by the AUR package (maybe I will change it to a source installation too).
The only one problem I have with ROOT is with the X11 (–web=off option) visualization that does not let me change the font format, so that I read nothing of the menu…
For Garfield I’ve just specified the installation folder to be:
-DCMAKE_INSTALL_PREFIX=$GARFIELD_HOME/install
I sourced the .sh file too.
Thank you for the help again!
EDIT: I forgot to say that I found the same C++ library problem on another software’s forum, I understand that - perhaps - there is a default CXXFLAGS option in conflict with Garfield.
Hi,
thanks for reporting this! The message seems to suggest that there is a bug somewhere in the code (trying to access an element greater than the size of the vector). Could you try to run gdb to see where this happens?
Oh furthermore, my colleague has a Rocky Linux virtual machine with C++ version 11 (mine is 14.2.1), I help him installing garfield and it works perfectly fine!
It could be a specific problem of my gcc version… I’ll try to install the v11 too to test this theory.