Skip to content
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

Max_step vs hipace.max_time #1177

Open
lboult opened this issue Oct 8, 2024 · 4 comments
Open

Max_step vs hipace.max_time #1177

lboult opened this issue Oct 8, 2024 · 4 comments

Comments

@lboult
Copy link

lboult commented Oct 8, 2024

Hi,

I would like to use the hipace.max_time definition to define how long my HiPACE simulations run for rather than max_step. However, I find that if I don't include max_step in the prefile that the simulation crashes with the message "Please use more or equal time steps than number of ranks".

I assume this is because HiPACE assumes the default value of max_step (0) and if you're using more than 1 gpu it doesn't like it. But anyway, I guess it should be the case that if hipace.max_time is provided then this should override the default value of max_step, if I'm understanding correctly?

Cheers,
Lewis

P.S would it also make sense to have max_step be hipace.max_step to be more consistent?

@MaxThevenet
Copy link
Member

Thanks @lboult for this issue. Could you share in input file, or just the relevant lines? I think the behavior you describe is what should be implemented already, so it would be good to see what dt, max_time and max_step you are using.

P.S would it also make sense to have max_step be hipace.max_step to be more consistent?

Could be done indeed, although we try to avoid such changes that require users to fix their old input scripts.

@AlexanderSinn
Copy link
Member

Currently, it is set up in a way where the simulation ends when either max_step or max_time is reached. The default max_time is infinite, while the default max_step is zero. So when you specify max_time you also need to provide a very large max_step like 1000000 to be sure that there are sufficient steps to reach the time.

@AlexanderSinn
Copy link
Member

A possible issue with having a max_step of infinity by default is that with an adaptive time step the beam might deplete before max_time which can result in a very large number of steps before the simulation ends. 

@lboult
Copy link
Author

lboult commented Oct 10, 2024

Hey guys,

Thanks for the responses. I see what Alex means now and perhaps this is the way it needs to say for the reasons you mention. Perhaps a note in the documentation about max_time might be useful but that's all :)

Cheers,
Lewis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants