-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Add automatic logging #479
Conversation
Does this eat up all terminal output or simply duplicate things? |
It only duplicates. The user experience remains exactly the same, it only duplicates information into log files. |
If you need the directory of the current script, then you can do this:
DIR="$(basename $(dirname $(readlink -f "$0")))" or using xargs DIR="$(readlink -f "$0" | xargs dirname | xargs basename)" |
@fsimonis Thank you, I used the xargs option. I simplified a lot, and now I am also printing Some considerations:
Any thought/suggestions/objections? |
Pragmatic solution:
|
I added now formatted start time, end time, and duration:
I understand that the way to stop the "waiting for data" in less is to "unbuffer" the output, which I assume could have significant performance impact (I have not measured). While I would prefer to solve this, I am also fine if it stays like this for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried:
- perpendicular flap: openfoam x {calculix, nutils}
- oscillator: python x fmi
We still need to add the new files to some cleaning scripts:
-
oscillator/fmi/clean.sh
-
oscillator/python/clean.sh
-
flow-around-controlled-moving-cylinder/controller-fmi/clean.sh
-
flow-around-controlled-moving-cylinder/solid-python/clean.sh
- ... more cases. Probably all that are not covered by the cleaning tools (elastic-tube-1d, quickstart, oscillator-overlap, more?)
Misc:
-
clean_dumux()
is missingclean_case_logs
Co-authored-by: Benjamin Uekermann <[email protected]>
Co-authored-by: Benjamin Uekermann <[email protected]>
I again ran |
When users ask for help, or simply when debugging any kind of simulation, it is very convenient to look at full log files in a text editor/viewer, instead of looking through short snippets of screen output (or, even worse, a screenshot of that).
This PR uses
tee
to log the screen output of each step in eachrun.sh
file into a log file (e.g.,fluid-openfoam.log
).run.sh
.clean.sh
script cleans this.The
touch case.foam
is now moved torun-openfoam.sh
.While we could essentially derive the name of the directory automatically, I could not find a short and POSIX-compliant way to do that. @fsimonis any suggestion?✔️I will apply the changes to everything once we agree on a standard.✔️TODO (but not necessary to incorporate before merging, this is already covering the vast majority of the cases):
ASTE
run-dealii.sh