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

Moderators: cyao, michael_borland

Post Reply
li.chao
Posts: 46
Joined: 18 Aug 2021, 08:59

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

Post by li.chao » 11 Jul 2023, 08:37

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

li.chao
Posts: 46
Joined: 18 Aug 2021, 08:59

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

Post by li.chao » 22 Aug 2023, 08:34

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

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

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

Post by michael_borland » 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

li.chao
Posts: 46
Joined: 18 Aug 2021, 08:59

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

Post by li.chao » 29 Aug 2023, 16:24

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

Post Reply