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

CUDAEnsemble truncate log files. #992

Merged
merged 6 commits into from
Nov 30, 2022
Merged

CUDAEnsemble truncate log files. #992

merged 6 commits into from
Nov 30, 2022

Conversation

Robadob
Copy link
Member

@Robadob Robadob commented Nov 22, 2022

Ensemble and simulation now have the argument --truncate or config variable truncate_log_files.

If true, this causes all output files to overwrite existing files (and in the case of ensemble exit logs, it will simply delete files at the start).

If false a FileAlreadyExists exception will be raised. The existence of files is checked at the start of calls to simulate() in the case of ensemble runs to ensure early exit, rather than after waiting for compute. Simulation's however perform this as the time of logging (to avoid repetition, due to those methods being possible to call in isolation).

  • CUDAEnsemble
  • CUDASimulation
  • Tests

Closes #818

@Robadob Robadob self-assigned this Nov 22, 2022
@Robadob Robadob marked this pull request as ready for review November 23, 2022 14:56
Copy link
Member

@ptheywood ptheywood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, both test suites pass under linux.

I've added 2 tests for --truncate argparsing to python, just to make sure it's available and the config properties can be accessed.

@mondus mondus merged commit 61a98c4 into master Nov 30, 2022
@mondus mondus deleted the truncate_logs branch November 30, 2022 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CUDAEnsemble log files always append
3 participants