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

output_file parameter for Console has issue with multiple processors #26174

Closed
YaqiWang opened this issue Nov 28, 2023 · 5 comments
Closed

output_file parameter for Console has issue with multiple processors #26174

YaqiWang opened this issue Nov 28, 2023 · 5 comments
Assignees
Labels
C: Framework T: task An enhancement to the software.

Comments

@YaqiWang
Copy link
Contributor

Reason

This parameter makes the console output into a file. When multiple processors are used, all processors will write to contents to the same file, which may corrupt the file. It also blows up the file when there are thousands of processors.

Design

We possibly should default the writing happens only on head processor. We may give users an option to do the output on multiple processors, but the outputs need to be either sequentialized with one file or outputted into different files based on the processor ID.

Impact

Fix the bad behavior of this input parameter and make it usable with multiple processors.

@YaqiWang YaqiWang added the T: task An enhancement to the software. label Nov 28, 2023
@permcody
Copy link
Member

This is a solved problem always has been.
--keep-cout --redirect-stdout. Is that not acceptable here? I recommend we close this as "won't fix".

@YaqiWang
Copy link
Contributor Author

YaqiWang commented Feb 29, 2024

It is a different but valid solution. The issue here is that this output_file parameter can have bad behavior. I do not mind this parameter is deleted.

@permcody
Copy link
Member

I talked to Patrick about this. I'm on board with making this more clear and not relying on libMesh behaviors.

pbehne added a commit to pbehne/moose that referenced this issue Feb 29, 2024
Console objects have a parameter 'output_file', that when true, writes console
output to a file. Parallel simulations would write information from all
processors to the same file, which can lead to bad behavior. This commit
introduces a patch that only writes console content from the head proc to the
file. In the case that --keep-cout is passed to the executable, each proc writes
its console content to a separate file. The same bahavior can be achieved
without setting output_file to true by instead passing
'--keep-cout --redirect-stdout' to the executable.

Closes Ref idaholab#26174.
pbehne added a commit to pbehne/moose that referenced this issue Mar 1, 2024
Console objects have a parameter 'output_file', that when true, writes console
output to a file. Parallel simulations would write information from all
processors to the same file, which can lead to bad behavior. This commit
introduces a patch that only writes console content from the head proc to the
file. In the case that --keep-cout is passed to the executable, each proc writes
its console content to a separate file. The same bahavior can be achieved
without setting output_file to true by instead passing
'--keep-cout --redirect-stdout' to the executable.

Closes Ref idaholab#26174.
pbehne added a commit to pbehne/moose that referenced this issue Mar 1, 2024
Console objects have a parameter 'output_file', that when true, writes console
output to a file. Parallel simulations would write information from all
processors to the same file, which can lead to bad behavior. This commit
introduces a patch that only writes console content from the head proc to the
file. In the case that --keep-cout is passed to the executable, each proc writes
its console content to a separate file. The same bahavior can be achieved
without setting output_file to true by instead passing
'--keep-cout --redirect-stdout' to the executable.

Closes Ref idaholab#26174.
schakrabortygithub pushed a commit to schakrabortygithub/moose that referenced this issue Mar 12, 2024
Console objects have a parameter 'output_file', that when true, writes console
output to a file. Parallel simulations would write information from all
processors to the same file, which can lead to bad behavior. This commit
introduces a patch that only writes console content from the head proc to the
file. In the case that --keep-cout is passed to the executable, each proc writes
its console content to a separate file. The same bahavior can be achieved
without setting output_file to true by instead passing
'--keep-cout --redirect-stdout' to the executable.

Closes Ref idaholab#26174.
@pbehne
Copy link
Contributor

pbehne commented Mar 20, 2024

@lindsayad, shouldn't this issue be closed?

@lindsayad
Copy link
Member

👍 this is closed by #26936

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Framework T: task An enhancement to the software.
Projects
Status: Done
Development

No branches or pull requests

4 participants