-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reach successfull XSuite <-> FLUKA exchange #31
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…0 for both sending particles and receiving particles. Desactivate server launch from xsuite (debugging purposes) + Uncomment functions from SixTrack and fix related types in common_modules + Modifications in pyfluka leading to solve the issues (follow what is done in SixTrack main_cr)
…thon engine is shutting down, but explicitely from example.py. This allows a complete and clean server & connection closure. + The message on "did you compile?" is only relevant the first time pyfluka is imported.
…o avoid Server timeout!
…s set in main_cr.f90). Instead, in XSuite, these variables were not set, leading to erroneous BRH0 (0), leading to all particles to be cut. Can now receive particles. TO DO: while those values in common_modules.f90 are not presently used, they will be used when the kernel_element in mod_fluka.f90 are uncommented, so maybe should set them in mod_common as well, instead of only passing them as parameters. TO DO 2: The next crash to explore happens with total particles >= 500, segfault in mgdraw.
…and from 1 in FlukaIO. Hence, was wrongly passing a 0 index as particle/parentId, hence issue with IDPIDP and IDPGEN (from mdstck.f) in mgdraw.f. Now sending / reception fully fly with even 20 000 particles.
…and from 1 in FlukaIO. Hence, was wrongly passing a 0 index as particle/parentId, hence issue with IDPIDP and IDPGEN (from mdstck.f) in mgdraw.f
…mory allocation done under the hood, contrary to fluka_mod_init). This allows to have the starting id of the received particles sparting from npart + 1, instead of inelegantly n_alloc + 1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes the following fixes:
fluka_init_max_uid
should also be called from XSuite, like in SixTrack. Otherwise, the server complains (fromfluka_coupling/fluka/source_pre.f
), and breaks the connection.pyfluka_set_synch_part
should also be called from XSuite, like in SixTrack. Otherwise, the server complains (fromfluka_coupling/fluka/source_pre.f
), and breaks the connection.lhc_run3_30cm001.out
).mgdraw.f
.Less important:
npart
instead ofn_alloc
as a parameter topyfluka_init_max_uid
(like in SixTrack). Under the hood,pyfluka_init_max_uid
only sets a particle id: the min id for new particles to start from (no memory allocation). While looking at the received particles, this avoids having the new particles indices starting from e.g. 50000 (defaultn_alloc
): instead, they simply start fromnpart + 1
.n_alloc
(instead ofnpart
) forfluka_mod_init
. Here, the situation is different, as under the hood, there is memory allocation (I presume this was done to avoid having to recompile, after changing the number of particles inexample.py
).e0
andeof
etc (mod_common
), like is done in SixTrack (otherwise, they stay at their default value 0).To be investigated for mental sanity:
fluka.log
). SixTrack seems to eventually use a third value (taken frominitial.dat
).Perspective:
lhc_run3_30cm001.out
. Look at the results.Should make @freddieknets happy.
Still a lot of further debugging to be done down the line.