Page 1 of 1

simulation speed when there are multi-bunches and muti-IBS element

Posted: 11 Jul 2023, 08:37
by li.chao
Dear Michael,

Recently, we are trying to simulate the multi-bunch together with multi-IBS scatter element. We are trying to see the computation efficiency of the for different scenarios.

The 6 cases we studied are

1. 80 bunches, (load in &sdds_beam command and data is separated by page), and each bunch contain 10K particles, multi-IBS at every sextupoles.
2. 80 bunches, (load in &sdds_beam command and data is separated by page), and each bunch contain 10K particles, one IBS at the end of the ring.
3. 80 bunches, (load in &sdds_beam command and data is separated by page), and each bunch contain 10K particles, no IBS

4. 1 bunch, 800K particles in total, multi-IBS at every sextupoles,
5. 1 bunch, 800K particles in total, one IBS at the end of the ring.
6. 1 bunch, 800K particles in total, no IBS

The simulations are launched in the same condition (64 cpus and 10 turns in total), the time consumed are listed below:

For multi-bunch cases:
case 1: 13:00 minutes; case 2: 6:00 minutes; case 3: 6:00 minutes

For single-bunch case:
case 4: 6:34 minutes; case 5: 5:57 minutes; case 6: 6:08 minutes

Seems like that, for single bunch simulation, the IBS does not cost too much extra CPU time. The simulation time increases from 6 minutes to 6.5 minutes

Whereas for multi-bunches case, if IBS scatter element number is 1, it does not cost extra time, however, if multi-IBS scatter elements are set as case 1, the simulation time will be significantly increased.

Seems like for the multi-bunch, multi-IBS scatter element, we can not get very good speed up. I understand, in general one IBS at the end of the ring is good enough, however, it is very curious about the reason why muti-Ibs setting slows down the computation. Would you please make some comment on that?

yours Chao

Re: simulation speed when there are multi-bunches and muti-IBS element

Posted: 22 Aug 2023, 08:34
by li.chao
Dear Michael,

I think I found the reason why the simulation speed is not well scaled in my simulation.
It seems like that comes from the settings of particleID.

When I prepare the simulation, I prepare the multi-bunches externally, in which I ensure that each particle has a unique particleID.
In this case, the simulation speed is slowed down (together with IBS element)

If I prepare the initial with SDDS—beam and with n_duplicate parameters.
The simulation speeds scales well as number of cpu crores.

It seems like that unique particleID settings will affect the simulation speed when there is IBS element.

Is there any reason for that?

yours Chao

Re: simulation speed when there are multi-bunches and muti-IBS element

Posted: 28 Aug 2023, 12:43
by michael_borland
Chao,

I wonder if in the case using bunch duplication you are setting the use_bunched_mode flag?

I would expect using N bunches to slow things down, because there is N times as much interprocess communication (assuming that IBS is a dominant factor in the simulation).

--Michael

Re: simulation speed when there are multi-bunches and muti-IBS element

Posted: 29 Aug 2023, 16:24
by li.chao
michael_borland wrote:
28 Aug 2023, 12:43
Chao,

I wonder if in the case using bunch duplication you are setting the use_bunched_mode flag?

I would expect using N bunches to slow things down, because there is N times as much interprocess communication (assuming that IBS is a dominant factor in the simulation).

--Michael
Thanks for your explanation.

I did not set the use_bunched_mode flag in the duplication mode simulation. Only set track_page_separately=1.

Whereas in the case when each particle has a unique particleID, the use_bunched_mode is set as 1.


yours Chao