-
Notifications
You must be signed in to change notification settings - Fork 312
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
In unit test build: files generated by genf90 should go in build dir rather than source dir #1188
Labels
code health
improving internal code structure to make easier to maintain (sustainability)
Comments
billsacks
added
the
code health
improving internal code structure to make easier to maintain (sustainability)
label
Oct 15, 2020
billsacks
added a commit
that referenced
this issue
Oct 23, 2020
Fix reading netcdf variable into a different data type Main change is to fix the reading of a variable that is one type on a NetCDF file but a different data type in memory. Previously, this could lead to memory corruption (not just of the variable in question, but other variables as well). This was not causing any problems in out-of-the-box configurations, but it sometimes tripped up some developers when they added new fields on datasets. In addition, this adds new self-test code to test ncdio_pio. This module is hard to get under unit test, but we want to have some tests of it, to pick up problems like the one fixed in this tag. So as a compromise solution for now, I have introduced unit test-like tests that are built into a standard build of CTSM and run in a standard run if a given namelist flag is set. A better long-term solution would be to integrate these tests into the pFUnit-based unit testing framework, but that would take some work. I have added tests of the new code, and a bit of testing of other code in ncdio_pio, but there's still a lot in ncdio_pio that is not tested. I figure we can gradually add tests as we make changes to ncdio_pio. Finally, an unrelated change to the unit test build: files generated by genf90 now appear in the unit test build directory rather than the source tree. Resolves #1091 (Memory corruption when reading a netcdf variable into a variable of a different type, at least with PIO1) Resolves #1188 (In unit test build: files generated by genf90 should go in build dir rather than source dir)
ekluzek
added a commit
to ekluzek/CTSM
that referenced
this issue
Oct 23, 2020
Fix reading netcdf variable into a different data type Main change is to fix the reading of a variable that is one type on a NetCDF file but a different data type in memory. Previously, this could lead to memory corruption (not just of the variable in question, but other variables as well). This was not causing any problems in out-of-the-box configurations, but it sometimes tripped up some developers when they added new fields on datasets. In addition, this adds new self-test code to test ncdio_pio. This module is hard to get under unit test, but we want to have some tests of it, to pick up problems like the one fixed in this tag. So as a compromise solution for now, I have introduced unit test-like tests that are built into a standard build of CTSM and run in a standard run if a given namelist flag is set. A better long-term solution would be to integrate these tests into the pFUnit-based unit testing framework, but that would take some work. I have added tests of the new code, and a bit of testing of other code in ncdio_pio, but there's still a lot in ncdio_pio that is not tested. I figure we can gradually add tests as we make changes to ncdio_pio. Finally, an unrelated change to the unit test build: files generated by genf90 now appear in the unit test build directory rather than the source tree. Resolves ESCOMP#1091 (Memory corruption when reading a netcdf variable into a variable of a different type, at least with PIO1) Resolves ESCOMP#1188 (In unit test build: files generated by genf90 should go in build dir rather than source dir)
ekluzek
added a commit
to olyson/ctsm
that referenced
this issue
Oct 23, 2020
Fix reading netcdf variable into a different data type Main change is to fix the reading of a variable that is one type on a NetCDF file but a different data type in memory. Previously, this could lead to memory corruption (not just of the variable in question, but other variables as well). This was not causing any problems in out-of-the-box configurations, but it sometimes tripped up some developers when they added new fields on datasets. In addition, this adds new self-test code to test ncdio_pio. This module is hard to get under unit test, but we want to have some tests of it, to pick up problems like the one fixed in this tag. So as a compromise solution for now, I have introduced unit test-like tests that are built into a standard build of CTSM and run in a standard run if a given namelist flag is set. A better long-term solution would be to integrate these tests into the pFUnit-based unit testing framework, but that would take some work. I have added tests of the new code, and a bit of testing of other code in ncdio_pio, but there's still a lot in ncdio_pio that is not tested. I figure we can gradually add tests as we make changes to ncdio_pio. Finally, an unrelated change to the unit test build: files generated by genf90 now appear in the unit test build directory rather than the source tree. Resolves ESCOMP#1091 (Memory corruption when reading a netcdf variable into a variable of a different type, at least with PIO1) Resolves ESCOMP#1188 (In unit test build: files generated by genf90 should go in build dir rather than source dir)
ekluzek
added a commit
to chrislxj/ctsm
that referenced
this issue
Oct 24, 2020
Fix reading netcdf variable into a different data type Main change is to fix the reading of a variable that is one type on a NetCDF file but a different data type in memory. Previously, this could lead to memory corruption (not just of the variable in question, but other variables as well). This was not causing any problems in out-of-the-box configurations, but it sometimes tripped up some developers when they added new fields on datasets. In addition, this adds new self-test code to test ncdio_pio. This module is hard to get under unit test, but we want to have some tests of it, to pick up problems like the one fixed in this tag. So as a compromise solution for now, I have introduced unit test-like tests that are built into a standard build of CTSM and run in a standard run if a given namelist flag is set. A better long-term solution would be to integrate these tests into the pFUnit-based unit testing framework, but that would take some work. I have added tests of the new code, and a bit of testing of other code in ncdio_pio, but there's still a lot in ncdio_pio that is not tested. I figure we can gradually add tests as we make changes to ncdio_pio. Finally, an unrelated change to the unit test build: files generated by genf90 now appear in the unit test build directory rather than the source tree. Resolves ESCOMP#1091 (Memory corruption when reading a netcdf variable into a variable of a different type, at least with PIO1) Resolves ESCOMP#1188 (In unit test build: files generated by genf90 should go in build dir rather than source dir)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I never liked that the files generated by genf90 in the unit test build got put in the source directory. I just found how to fix that so they can go in the unit test build space instead. I'll fix that on a branch that will come to master soon.
The text was updated successfully, but these errors were encountered: