radiasoft / sirepo

Sirepo is a framework for scientific cloud computing. Try it out!
https://sirepo.com
Apache License 2.0
64 stars 32 forks source link

get synergia working on fedora 36 #5170

Closed e-carlin closed 1 year ago

e-carlin commented 1 year ago

As part of the fedora 36 migration synergia was updated (https://github.com/radiasoft/download/pull/349). They changed the API for constructing/running simulation which will necessitate Sirepo changes.

e-carlin commented 1 year ago

I can get the simulation to run but now it ends in the below error. Same error happens with the one copied from their docs

terminate called after throwing an instance of 'std::runtime_error'
  what():  Kokkos allocation "particles_discards" is being deallocated after Kokkos::finalize was called
robnagler commented 1 year ago

Great about getting it to run. Maybe go back some number of commits? You could also maybe email the developers. I think they are friendly enough.

e-carlin commented 1 year ago

This is some race-condition bug in synergia (I'm guessing). If I take the example from the website and move all code out of function and to the top-level of the script then I see the bug. But, if I leave the code as is (with functions) then it works.

Narrowing it down it seems that if I just make the lattice or the simulation objects (by returning them from the function and saving in a variable) then I get the error. I'll open up a github issue with them.

e-carlin commented 1 year ago

https://github.com/fnalacceleratormodeling/synergia2/issues/106

e-carlin commented 1 year ago

Update: Took the synergia folks suggestion and made it so there are no kokkos variables left at the outermost scope when the script exits. Now the test runs to completion. But, it fails because the results are different. In one case some of the numbers are different. In another the result hdf5 file no longer has a key we want.

e-carlin commented 1 year ago

I gave up on getting the tests to pass because I found it too hard to see what the code was doing. Easier to look at the examples on sirepo.com and compare them to the examples running in the vm. I got the basic FODO example working except for twiss parameters. I don't quite yet understand the synergia twiss code well enough to know what the solution will be. But possibly rssynergia will have to change.

e-carlin commented 1 year ago

Won't fix. Not worth the amount of work https://github.com/radiasoft/sirepo/issues/5222