-
Notifications
You must be signed in to change notification settings - Fork 39
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
Converted tests to use cgnsdiff #54
Conversation
Adding the |
Adding a |
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.
Looks good to me, thanks for putting in the work -- tests look much nicer now. I would like to hear @eirikurj or others' opinions on these extra Barrier calls before merging though.
@eirikurj is this looking good? |
This is still awaiting review @eirikurj @SichengHe |
@@ -92,6 +92,9 @@ subroutine writeCGNS(fileName) | |||
! Copy values and write: | |||
do k=1,N | |||
|
|||
! Synchronize before scattering | |||
call mpi_barrier(hyp_comm_world, ierr) |
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.
What is the reasoning behind this barrier?
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 tests were failing on the TACC image without this barrier. I think it is related to the newer Intel MPI version used on that image. We did not see this problem before because all the tests ran on 1 proc.
Does it make sense to call barrier before a PETSc generalized scatter? I'm not convinced this is a bug in pyHyp as opposed to something wrong with the TACC image or Intel MPI.
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.
Would have expected it to be fine even w/o the barrier but I dont know enough. If it fixes an issue on TACC, then sure.
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.
Yeah this is a bit weird, Sabet and I had some conversations about this but I don't really understand what's going on. Maybe it's an MPI implementation-specific behaviour?
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.
So I can try to read and understand the scatter stuff and its usage, but it will take a few more days probably. To me this is not too performance critical since these meshes are run once and not in the loop etc.
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.
Yeah I thought scatter is blocking already, but according to @sseraj he tried many combinations and this was the only one that worked consistently.
The tests look great, thanks for the work. I am fine with the final barrier before returning on the python level but I am curious about why we have that barrier before the scatter stuff. If that also makes sense, this is good to go for me. |
Can you also review again @nwu63 so we can merge this? |
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.
Just one comment: we don't actually need examples/__init__.py
right? AFAIK since py3.3+ we no longer need to have an init file to import, and the os.path
modifications should be enough.
@@ -5,14 +5,14 @@ | |||
import sys | |||
|
|||
|
|||
def _tmp_pkg(directory): | |||
def _tmp_pkg(dirName): |
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.
Why did you change this? directory
isn't a built-in keyword right? I'm fine with renaming just wanted to understand
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 changed dir
to dirName
at the same time you changed dir
to directory
. I guess I won in the merge. I changed it back in any case.
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 like that better, I'll just remove the last commit and then approve.
N_PROCS = 2 | ||
|
||
def setUp(self): | ||
# Insert the repo root in path so that testflo can import examples |
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.
FYI this was also a trick I used in order to import examples
Purpose
This is a second attempt at revamping the pyHyp tests, this time using
cgnsdiff
(based on discussion in #52). I generated the ref files by running the examples with 2 procs on theu20-gcc-ompi-latest
image.I verified that the tests fail if any of the following change:
Type of change
What types of change is it?
Select the appropriate type(s) that describe this PR
Testing
Testing steps are on the installation page in the docs.
Checklist
Put an
x
in the boxes that apply.flake8
andblack
to make sure the code adheres to PEP-8 and is consistently formatted