-
Notifications
You must be signed in to change notification settings - Fork 38
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
Mesh check error printout #81
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #81 +/- ##
==========================================
- Coverage 79.48% 78.87% -0.61%
==========================================
Files 4 4
Lines 424 426 +2
==========================================
- Hits 337 336 -1
- Misses 87 90 +3 ☔ View full report in Codecov by Sentry. |
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.
This needs some minor fixes and formatting with fprettify
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.
From what I can tell, this looks good overall, although I dont have a case to test this. Just a few minor comments.
@@ -799,6 +807,11 @@ subroutine setup(fileName, fileType) | |||
end do | |||
end do patchLoop | |||
|
|||
! if there was an error in the BC setup stop | |||
if (bcError) then | |||
stop |
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 realize that this was like this before, but since this is a parallel code, we should probably call mpi_abort
to exit more gracefully. However, since there are other locations, we could also defer this to a separate PR.
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.
There are several places where the error handling isn't done properly in parallel and MPI gives wild errors, I could make an issue to address that.
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.
For consistency, can you add ERROR
here as well.
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.
Sorry for the delay, couple of additional comments. BTW, do you have a mesh that we can add as tests that catch these cases?
@@ -799,6 +807,11 @@ subroutine setup(fileName, fileType) | |||
end do | |||
end do patchLoop | |||
|
|||
! if there was an error in the BC setup stop | |||
if (bcError) then | |||
stop |
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.
For consistency, can you add ERROR
here as well.
else: | ||
caseName = "" |
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.
Is there ever a case you dont have either inputFile
or outputFile
specified?
! if there was an error in the BC setup stop | ||
if (bcError) then | ||
print *, 'pyHyp exited due to one or more issues with mesh boundary conditions. & | ||
& See above error printouts.' |
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.
The leading &
with all the spaces will create a large gap in the string. For the line continuation to have consistent spacing, place the &
right before See
, i.e., &See
.
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.
Sorry for the delay, couple of additional comments. BTW, do you have a mesh that we can add as tests that catch these cases? Would also be good to add printout to the PR description. Create #92 to track that we should update to mpi_abort
at some point.
Purpose
This changes the logic for error printouts for boundary condition checks and topology errors so all errors present in the mesh will print out. The previous behavior was to exit on the first issue, making it hard to fix multiple errors at once.
I also changed the printout that shows up at the start of a case. Originally it printed the case name as the name of the input file, but when running pyHyp with patch input there's no input file. I changed this to print the output file when there isn't an input file.
Expected time until merged
None
Type of change
Testing
Run this with a broken mesh to see if all expected errors are printed out
Checklist
flake8
andblack
to make sure the Python code adheres to PEP-8 and is consistently formattedfprettify
or C/C++ code withclang-format
as applicable