-
Notifications
You must be signed in to change notification settings - Fork 62
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
Caliper overwriting output file? #536
Comments
Hi @cielling, there is currently no append option unfortunately. You can however set a Caliper attribute and use that to create a new filename for every flush. That may be a workaround. The example below shows how to set an attribute "cycle" for the flush. You can then set
Hope this helps! |
Hi @daboehme, thanks for the response! So what I'm hearing is that output to a file is at least somewhat intentionally different from output to stdout? Would Caliper be able to provide us with a flag to append the outputs when writing to a file? The concern that the code team has with creating a new file for every flush is that this could potentially create thousands of files which would be stressing the file system. |
Hi @cielling, yes the output to file is different from the stdout/stderr output. I think it would make sense to offer an append option though and even make that the default. I'll look into it. |
@daboehme Having an append option would be great. Thanks for looking into this! |
Hi @daboehme, I wanted to check in to see when you/the Caliper team will have time to look into the append option? Thanks! |
Hi @cielling, we now have the option to append to a file. It is default on for |
Thank you, @daboehme, much appreciated! |
I have a (Fortran) code that has been instrumented with Caliper and is configured so that it can trigger Caliper to write a report at regular intervals through the 'flush' method on the config-manager.
If I configure Caliper at runtime to collect the runtime-report and report it at, say, every 5 cycles to stdout (i.e. the default output destination), I get a runtime-report written to stdout every 5 cycles as expected.
However, if I set Caliper to write the runtime-reports to a file instead of stdout (with the 'output=my_output.txt' option), the final file that is written only contains the last runtime-report, and not any of the previous ones that should have been emitted during the run. It looks to me that Caliper is overwriting the file every time it writes a report.
I would have expected the behavior to be the same, regardless of the destination of the output. Is there an 'append' option that I'm missing? Or is this a bug in Caliper?
Thanks for any help!
The text was updated successfully, but these errors were encountered: