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

Parallel analysis error fix #1878

Merged
merged 3 commits into from
Feb 8, 2021
Merged

Conversation

anilyil
Copy link
Contributor

@anilyil anilyil commented Feb 5, 2021

Summary

This PR fixes how the AnalysisError is raised in parallel runs with both linear and nonlinear solvers. Before this PR, the error was only raised on root unless the environment variable USE_PROC_FILES was set to True. The PR fixes it so that the convergence checks are performed on all procs in the comm, and similarly, all procs in the comm raise this error if desired. The behavior of the print statements are preserved; if USE_PROC_FILES is false or not set, only root prints, else, all procs print to their files.

I also added tests to check if the analysis error is raised properly on all procs when nonlinear or linear solvers fail. However, without this fix, these tests actually just hang and not explicitly fail. This is because the process hangs without the fix. Is there a way to trigger a failure for this case @JustinSGray?

Related Issues

Backwards incompatibilities

None

New Dependencies

None

Copy link
Member

@Kenneth-T-Moore Kenneth-T-Moore 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 (code and tests.) Nice catch.

@anilyil
Copy link
Contributor Author

anilyil commented Feb 5, 2021

I think the lint test failed due to indentation. will push a fix in a second

@swryan swryan merged commit 660f47e into OpenMDAO:master Feb 8, 2021
@anilyil anilyil deleted the analysis_error_fix branch February 9, 2021 08:11
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

Successfully merging this pull request may close these issues.

analysis error on non-convergence is broken in parallel runs with both linear and nonlinear solvers
3 participants