-
Notifications
You must be signed in to change notification settings - Fork 22
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 non-working unit tests and smoke tests for new features. #164
Conversation
Changes added should close #160. See comment there. |
@abhyshr, I was adding a smoke test for input_twoarea_renewable_mech.xml, but it refers to |
Bill, you can use the same two area system network file for the tests. I renamed the file and may have forgotten to change its name in different input.xml files. |
PETSc matrix transpose semantics have changed such that implementing transpose into an existing template <typename T, typename I>
void transpose(const MatrixT<T, I>& A, MatrixT<T, I>& result); It does not appear in any application code. The function creating a new template <typename T, typename I>
MatrixT<T, I> *transpose(const MatrixT<T, I>& A); is still available and should be used exclusively now. |
I just tried building and running 240 bus case in the fix/testing branch. I'm not seeing a crash at the end. Ths is my environment
and this is how I'm configuring
|
I too do not get any errors when building
I've consistently get the SEGV at
|
@abhyshr, for the DSA application i have been using the data files here, specifically input files input_2000bus.xml and input_tamu2000_dsf.xml. I've discovered that these will not work with |
@wperkins wind2.x is the application you should be using for the DSA test, not wind.x. Do you not see the application when you build GridPACK? If not, can you rebase develop over your branch and retry. I merged the wind_dsa branch with develop. Also, using the 2000 bus file for testing wind_dsa would be too time-consuming since it is set to run a lot of contingencies. We'll probably need to use a smaller dataset. |
I think that bus does not have an angle field. The angle field is set by a generator. For the 240 bus system, there are buses with generators that do not have angle variables and hence the segfault. What is triggering the |
Doh! wind2.x is there. I was using dsf2.x. |
I tried running the 240 bus test case after compiling with RelWithDebInfo. The code crashes for me. According to Valgrind, it is trying to access some invalid data in this routine
I do not understand why Valgrind is reporting an error (both p_gstatus[0] and p_generators[0] appear to exist and have been initialized) but for some reason it is. This is the first generator with status 0 so maybe it has something to do with that. However, this routine seems to be pretty bogus as written. It basically returns the angle of the first generator on the bus if there is more than one and some indeterminate answer if there are no generators or the generators all have status 0. It should be cleaned up. Any suggestions on what it should do if there are multiple generators? Or maybe we need to modify the syntax so that this function takes a generator index. Also, if the generator is turned off and no value is set, should it return 0? |
@bruce: What is the bus number (external) for this generator? Let me check if this generator is of renewable type, in which case it does not have any Angle variable. The This piece of code needs to go away. Instead something like |
The bus is 3432. I think your function still needs some work. If it is defined as a function on the bus, then it still probably needs a bus index (or a 2-character generator ID).
|
I looked at this a bit more. I don't think Valgrind is catching the true problem but I think some sort of memory issue is being created if the status is set to 0. It could be that a data vector is not extended to account for that generator but later on somebody tries to access it anyway. I don't think it is actually anything to do with the getAngle function, but that is just where the system final steps on something that has already been corrupted and crashes. |
All math tests are fixed. The problem with DAE solver tests was the addition of a DAESolver constructor with an inconsistent matrix pointer type. |
@abhyshr and @jacksavage, here is a current summary of unit test results as of revision f5e91bc on this branch. This is on my Ubuntu 20 system with
Debug build:
Test 71 fails with
which is one of those random memory corruption errors I've been complaining about. Release build:
Test 71 fails as described as with the Debug build. The other tests all SEGV as discussed above. |
getAngle() method is messed up and it is NOT defined for REGCA1 model
* Remove GA-based dense matrix; adjust matrix transpose * Remove all PETSC_VERSION usage. * Update PETSc settings for tlaloc * Add smoke test for 240-bus dynamic simulation * Add a CMake macro to do the LU solver check and use it * Add smoke test for 2-area dynamic simulation * Add smoke test for two area case w/ renewables * Remove math::transpose(Matrix<>, Matrix<>) because of PETSc transpose semantics * Add smoke tests for dsf2.x (same as for dsf.x). * Add smoke test for Wind DSA 9-bus case * Fix typos in Wind DSA TAMU 2000 case * Add a smoke test for Wind DSA TAMU 2000 case * Remove ancient test from `applications/development/dynamic_simulation_reduced_y` * Fix incorrect Matrix type Jacobian supplied to DAESolver constructor * Update my build script * Remove 2000-bus Wind-DSA smoke tests - they take too long * Switch to a direct linear solver because this was diverging * Fix memory crash for dsf application in Release mode. getAngle() method is messed up and it is NOT defined for REGCA1 model * Use gridpack::Environment instead of direct MPI/GA calls * Use a newer PETSc w/o SuperLU_dist on tlaloc * Fix parallel mapper test that failed with newer PETSc --------- Co-authored-by: Shri <[email protected]>
* Remove GA-based dense matrix; adjust matrix transpose * Remove all PETSC_VERSION usage. * Update PETSc settings for tlaloc * Add smoke test for 240-bus dynamic simulation * Add a CMake macro to do the LU solver check and use it * Add smoke test for 2-area dynamic simulation * Add smoke test for two area case w/ renewables * Remove math::transpose(Matrix<>, Matrix<>) because of PETSc transpose semantics * Add smoke tests for dsf2.x (same as for dsf.x). * Add smoke test for Wind DSA 9-bus case * Fix typos in Wind DSA TAMU 2000 case * Add a smoke test for Wind DSA TAMU 2000 case * Remove ancient test from `applications/development/dynamic_simulation_reduced_y` * Fix incorrect Matrix type Jacobian supplied to DAESolver constructor * Update my build script * Remove 2000-bus Wind-DSA smoke tests - they take too long * Switch to a direct linear solver because this was diverging * Fix memory crash for dsf application in Release mode. getAngle() method is messed up and it is NOT defined for REGCA1 model * Use gridpack::Environment instead of direct MPI/GA calls * Use a newer PETSc w/o SuperLU_dist on tlaloc * Fix parallel mapper test that failed with newer PETSc --------- Co-authored-by: Shri <[email protected]>
* Initial checkin of PSS/E v34 export module * Minor format change. * Different module for impedence corrections is unecessary. * This module is unecessary. V33 and V34 are the same for the impedence correctioThis module is unecessary. V33 and V34 are the same for the impedence correction. * Corrected name on export_sys_switch file. * Fixed export module for v34 PSS/E files. * Add methods to export PSSE33 and PSSE34 from the hadrec application * Added some error handling code to parsing. * Fixed up parsing error for some transformer values. * Fixed up a problem with branch names in the PSS/E v34 parser and export modules. * Fix non-working unit tests and smoke tests for new features. (#164) * Remove GA-based dense matrix; adjust matrix transpose * Remove all PETSC_VERSION usage. * Update PETSc settings for tlaloc * Add smoke test for 240-bus dynamic simulation * Add a CMake macro to do the LU solver check and use it * Add smoke test for 2-area dynamic simulation * Add smoke test for two area case w/ renewables * Remove math::transpose(Matrix<>, Matrix<>) because of PETSc transpose semantics * Add smoke tests for dsf2.x (same as for dsf.x). * Add smoke test for Wind DSA 9-bus case * Fix typos in Wind DSA TAMU 2000 case * Add a smoke test for Wind DSA TAMU 2000 case * Remove ancient test from `applications/development/dynamic_simulation_reduced_y` * Fix incorrect Matrix type Jacobian supplied to DAESolver constructor * Update my build script * Remove 2000-bus Wind-DSA smoke tests - they take too long * Switch to a direct linear solver because this was diverging * Fix memory crash for dsf application in Release mode. getAngle() method is messed up and it is NOT defined for REGCA1 model * Use gridpack::Environment instead of direct MPI/GA calls * Use a newer PETSc w/o SuperLU_dist on tlaloc * Fix parallel mapper test that failed with newer PETSc --------- Co-authored-by: Shri <[email protected]> * Remove stale code (#182) * Remove stale Fortran interface * Remove Fortran interface documentation * Remove optimization/expression code and documentation * Remove sandbox code * Remove stale debian packaging (#181) * Remove dynamic_simulation, dynamic_simulation_implicit, and powerflow2 applications. --------- Co-authored-by: Shri <[email protected]> * Remove cmake-jedbrown and all related stuff (#180) * Remove cmake-jedbrown submodule * Stop using Jed Brown's find petsc stuff * Cleaned up some unresolved code. --------- Co-authored-by: Bruce J Palmer <[email protected]> Co-authored-by: William Perkins <[email protected]> Co-authored-by: Bruce J Palmer <[email protected]> Co-authored-by: Bill <[email protected]> Co-authored-by: Shri <[email protected]>
The goal of this PR is to get GridPACK's unit testing back into working order. The main problem is
Matrix<>
tests, but some applications fail too. In addition, some new features of dynamic simulation need smoke tests. This should fix #118.