svenreiche / Genesis-1.3-Version4

Time-dependent, 3D Code to simulate the amplification process of a Free-electron Laser.
GNU General Public License v3.0
53 stars 26 forks source link

[BUG] Error when dumping electron beam when one4one = false #139

Closed nrt63 closed 7 months ago

nrt63 commented 7 months ago

Describe the bug

Version 4.6.5. Error reported with writing particle distributions to file:


Writing particle distribution to file: SXR_SSEEDING_MOD1.par.h5 ... terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 2048) >= this->size() (which is 2048)


This error only occurs when one4one = false

To Reproduce Input file code:


&setup . . npart = 2048 one4one = false . . &end

&write beam=SXR_SSEEDING_MOD1 &end

&track beam_dump_step=278 &end

Expected behavior Writing of a .par.hr file

Additional context Apologies if user error!

nrt63 commented 7 months ago

Edit - problem also occurs when one4one = true. Title of issue amended.

ZeugAusHH commented 7 months ago

Hi,

this might be related to the discussion in https://github.com/svenreiche/Genesis-1.3-Version4/issues/134 , especially the pull request https://github.com/svenreiche/Genesis-1.3-Version4/pull/138 .

Please try with the most recent status by cloning the master branch and check if it solves the issue.

Best Christoph

svenreiche commented 7 months ago

I ran some test files with the latest version and I have no crash. As mentioned before it is the bug which has been only fixed last week.

Can you check on your side with the latest git commit of the master branch?

Best Sven

svenreiche commented 7 months ago

HAs been verified that the problem is solved with the recent commit to fix the problem with dumping the particles