-
Notifications
You must be signed in to change notification settings - Fork 641
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
Fix factor of 2 in adjoint gradients when not using complex fields #1704
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #1704 +/- ##
==========================================
+ Coverage 73.32% 73.33% +0.01%
==========================================
Files 13 13
Lines 4525 4527 +2
==========================================
+ Hits 3318 3320 +2
Misses 1207 1207
|
I am very confused why the "CI/Test Python 3.9 with MPI (true)" failed while the other three passed. In fact, the test that failed is |
stevengj
reviewed
Jul 28, 2021
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
stevengj
added a commit
that referenced
this pull request
Jul 30, 2021
* fix factor 2 * fix * fix * fix * kpoint * fix * Fix the `binary_partition` copy constructor. (#1702) * Fix the `binary_partition` copy constructor. Prevents issues with older compilers. \#1683 #1701 * Update src/structure_dump.cpp Co-authored-by: Steven G. Johnson <stevenj@mit.edu> Co-authored-by: Steven G. Johnson <stevenj@mit.edu> * single precision test tol * single precision test tol * Fix factor of 2 in adjoint gradients when not using complex fields (#1704) * fix factor 2 * fix * fix * fix * single precision test tol * single precision test tol * Update python/adjoint/objective.py Co-authored-by: Steven G. Johnson <stevenj@mit.edu> Co-authored-by: Mo Chen <mochen@Mos-MacBook-Pro.local> Co-authored-by: Steven G. Johnson <stevenj@mit.edu> * assertVectorsClose works for scalars as well as vectors (#1712) * assertVectorsClose works for scalars as well as vectors * rename ApproxComparisonMixin -> ApproxComparisonTestCase, since it is a subclass of TestCase, and use it as such * add --with-coverage to control usage of Python coverage tests (#1713) * add --with-coverage to control usage of Python coverage tests * move --with-coverage to correct CI line * flush subnormals on x86 (#1709) * flush subnormals on x86 * less aggressive error threshold in single precision * increase single-precision tolerance * update tols in test_array_metadata * update for assertVectorsClose rename * lower tolerance in single precision * Lower tolerance of CW and eigenfrequency solver tests for single precision (#1714) * lower tolerance of CW and eigenfrequency solver tests for single precision * remove change in default argument from Python wrappers * fix factor 2 * fix * kpoint * fix * single precision test tol * single precision test tol * using real * using real * fix rebase * fix * fix Co-authored-by: Mo Chen <mochen@Mos-MacBook-Pro.local> Co-authored-by: Andreas Hoenselaar <ahoens@google.com> Co-authored-by: Steven G. Johnson <stevenj@mit.edu> Co-authored-by: Ardavan Oskooi <ardavano@google.com>
bencbartlett
pushed a commit
to bencbartlett/meep
that referenced
this pull request
Sep 9, 2021
…anoComp#1704) * fix factor 2 * fix * fix * fix * single precision test tol * single precision test tol * Update python/adjoint/objective.py Co-authored-by: Steven G. Johnson <stevenj@mit.edu> Co-authored-by: Mo Chen <mochen@Mos-MacBook-Pro.local> Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
bencbartlett
pushed a commit
to bencbartlett/meep
that referenced
this pull request
Sep 9, 2021
* fix factor 2 * fix * fix * fix * kpoint * fix * Fix the `binary_partition` copy constructor. (NanoComp#1702) * Fix the `binary_partition` copy constructor. Prevents issues with older compilers. \NanoComp#1683 NanoComp#1701 * Update src/structure_dump.cpp Co-authored-by: Steven G. Johnson <stevenj@mit.edu> Co-authored-by: Steven G. Johnson <stevenj@mit.edu> * single precision test tol * single precision test tol * Fix factor of 2 in adjoint gradients when not using complex fields (NanoComp#1704) * fix factor 2 * fix * fix * fix * single precision test tol * single precision test tol * Update python/adjoint/objective.py Co-authored-by: Steven G. Johnson <stevenj@mit.edu> Co-authored-by: Mo Chen <mochen@Mos-MacBook-Pro.local> Co-authored-by: Steven G. Johnson <stevenj@mit.edu> * assertVectorsClose works for scalars as well as vectors (NanoComp#1712) * assertVectorsClose works for scalars as well as vectors * rename ApproxComparisonMixin -> ApproxComparisonTestCase, since it is a subclass of TestCase, and use it as such * add --with-coverage to control usage of Python coverage tests (NanoComp#1713) * add --with-coverage to control usage of Python coverage tests * move --with-coverage to correct CI line * flush subnormals on x86 (NanoComp#1709) * flush subnormals on x86 * less aggressive error threshold in single precision * increase single-precision tolerance * update tols in test_array_metadata * update for assertVectorsClose rename * lower tolerance in single precision * Lower tolerance of CW and eigenfrequency solver tests for single precision (NanoComp#1714) * lower tolerance of CW and eigenfrequency solver tests for single precision * remove change in default argument from Python wrappers * fix factor 2 * fix * kpoint * fix * single precision test tol * single precision test tol * using real * using real * fix rebase * fix * fix Co-authored-by: Mo Chen <mochen@Mos-MacBook-Pro.local> Co-authored-by: Andreas Hoenselaar <ahoens@google.com> Co-authored-by: Steven G. Johnson <stevenj@mit.edu> Co-authored-by: Ardavan Oskooi <ardavano@google.com>
mawc2019
pushed a commit
to mawc2019/meep
that referenced
this pull request
Nov 3, 2021
…anoComp#1704) * fix factor 2 * fix * fix * fix * single precision test tol * single precision test tol * Update python/adjoint/objective.py Co-authored-by: Steven G. Johnson <stevenj@mit.edu> Co-authored-by: Mo Chen <mochen@Mos-MacBook-Pro.local> Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
mawc2019
pushed a commit
to mawc2019/meep
that referenced
this pull request
Nov 3, 2021
* fix factor 2 * fix * fix * fix * kpoint * fix * Fix the `binary_partition` copy constructor. (NanoComp#1702) * Fix the `binary_partition` copy constructor. Prevents issues with older compilers. \NanoComp#1683 NanoComp#1701 * Update src/structure_dump.cpp Co-authored-by: Steven G. Johnson <stevenj@mit.edu> Co-authored-by: Steven G. Johnson <stevenj@mit.edu> * single precision test tol * single precision test tol * Fix factor of 2 in adjoint gradients when not using complex fields (NanoComp#1704) * fix factor 2 * fix * fix * fix * single precision test tol * single precision test tol * Update python/adjoint/objective.py Co-authored-by: Steven G. Johnson <stevenj@mit.edu> Co-authored-by: Mo Chen <mochen@Mos-MacBook-Pro.local> Co-authored-by: Steven G. Johnson <stevenj@mit.edu> * assertVectorsClose works for scalars as well as vectors (NanoComp#1712) * assertVectorsClose works for scalars as well as vectors * rename ApproxComparisonMixin -> ApproxComparisonTestCase, since it is a subclass of TestCase, and use it as such * add --with-coverage to control usage of Python coverage tests (NanoComp#1713) * add --with-coverage to control usage of Python coverage tests * move --with-coverage to correct CI line * flush subnormals on x86 (NanoComp#1709) * flush subnormals on x86 * less aggressive error threshold in single precision * increase single-precision tolerance * update tols in test_array_metadata * update for assertVectorsClose rename * lower tolerance in single precision * Lower tolerance of CW and eigenfrequency solver tests for single precision (NanoComp#1714) * lower tolerance of CW and eigenfrequency solver tests for single precision * remove change in default argument from Python wrappers * fix factor 2 * fix * kpoint * fix * single precision test tol * single precision test tol * using real * using real * fix rebase * fix * fix Co-authored-by: Mo Chen <mochen@Mos-MacBook-Pro.local> Co-authored-by: Andreas Hoenselaar <ahoens@google.com> Co-authored-by: Steven G. Johnson <stevenj@mit.edu> Co-authored-by: Ardavan Oskooi <ardavano@google.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1685. The test_adjoint_solver.py is updated correspondingly to include when
force_complex_fields=True
.