Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sparse array operations to main development branch (#351)
* Initial check in to save changes. Code does not work. * Adding more functionality to sparse arrays. The array class builds but has not been tested. * Added sparse array routines to user interface and to the build system. * Test program for sparse array functionality. * Code works on 1 processor. Saving changes. * Checking in code that works on one and two processors. * Tests are now running up to 3 processors * Adding some debugging prints. * Fixed data type mismatch. * Fixed up a bug in the add element function, removed prints and increased size of test problem. * Fixed up test of matrix-vector multiply. Still need to get a consistent handling of indexing. * Fixed up indexing so that everthing is zero base. * Modified code to do a better job of handling integer sizes in C-interface. * Added some modifications to build and sparse array to support test case that solves Laplace's equation using a conjugate gradient algorithm. * Added test case to solve Laplace's equation using conjugate gradient algorithm. * Added some code so you can write out a VTK formatted file containing the solution. This can be visualized using something like VisIt or Paraview. * Added a sparse matrix-vector multiply routine to the sparse array operations. * Cleaned up header files and modified laplace.x test case to allocation more memory in MA. * Fixed up a bug in sparse array assembly operation. * Adding asynchronous implementations to repository. * Added BiCG-STAB implementation to test code for sparse matrices. * Initial checkin of solver based on randomized Kaczmarz. * Initial checkin of asynchronous Kaczmarz solver. * Fixed up some bugs in Kaczmarz solve. It appears to run at this point. * Normalized row of A and b to improve solution. * Initialized internal array handles to invalid value and added some code to compare Kaczmarz solution to conjugate gradient. * Modified data layout so that processor blocks are laid out consecutively in distributed memory. * Fixed export of VTK visualization file. * Modified code so it is easy to switch back and forth from old slab distribution to block distribution and cleaned up output to VTK file. * Added some code to calculate the distribution of errors. * Added code to print out distribution of differences and print out differences between exact and Kaczmarz answers to VTK file. * Added routine to export sparse matrix to an ASCII file. * Added operations to get the diagonal of a sparse matrix, left multiply a sparse matrix with a diagonal matrix represented by a vector, and shift the diagonal of a sparse matrix by a constant amount. * Added function to create a duplicate of a sparse array. * Cleaned up sparse array operations so that they work for all data types and added operations to multiply a sparse matrix by a diagonal matrix. * Modified Makefile.am so that some test that have not been checked in are not being run. * Fixed up some bugs in shift_diag macros. * Fix up factorization routine. * Fix up fortran interface to handle pointers correctly. * Fixed up some bugs in fortran interface and added functionality to extract single sparse blocks from sparse array. * Capture some updates. * Capture some recent changes. * Added sprs_test.c file to repository to fix compilation error in CI. * Removed randomcg from testing. * Removed additional asynchronous algorithms that don't work from testing. * Initial checkin of j_iter.c * Capture latest changes to matrix-matrix multiply routine. Currently compiles but not tested to see if it works. * Added matrix-matrix multiply operation to sparse array library. * Modified code so that buffers for matrix-matrix multiply are preallocated. This eliminates the need to keep resizing buffers on the fly. * Added tests to verify all non-zeros appear in matrix-matrix multiply and put timers on all sparse matrix operations. * Fixed bug in add element routine that was not correctly resizing arrays. * Fixed up some additional bugs with temporary arrays for holding sparse array indices. * Added fixes to sparse matrix-matrix multiply operation. * Added functionality to extract column from sparse matrix. * Fixed up count_sketch function and added test for it to sprs_test.c * Added files for random number generator based on Mersenne twister and a file implementing count sketch algorithm. * Add file implementing random Gram-Schmidt orthogonalization algorithm. * Replaced ran3 random number generator with Mersenne twister implementation and added test for routines implementing count sketch algorithm. * Added Mersenne twister to build files, fixed up sparse array export module and added some minor bug fixes. * Checking in some fixes for linear arrays and capturing current state of random Gram-Schmidt orthogonalization code. * Added test for random number generator. * Added test for random number generator to build. * Added new functionality for mixed sparse-dense operations. * Added synchronization and mask variables to all global operations. * Initial check in to save changes. Code does not work. * Adding more functionality to sparse arrays. The array class builds but has not been tested. * Added sparse array routines to user interface and to the build system. * Test program for sparse array functionality. * Code works on 1 processor. Saving changes. * Checking in code that works on one and two processors. * Tests are now running up to 3 processors * Adding some debugging prints. * Fixed data type mismatch. * Fixed up a bug in the add element function, removed prints and increased size of test problem. * Fixed up test of matrix-vector multiply. Still need to get a consistent handling of indexing. * Fixed up indexing so that everthing is zero base. * Modified code to do a better job of handling integer sizes in C-interface. * Added some modifications to build and sparse array to support test case that solves Laplace's equation using a conjugate gradient algorithm. * Added test case to solve Laplace's equation using conjugate gradient algorithm. * Added some code so you can write out a VTK formatted file containing the solution. This can be visualized using something like VisIt or Paraview. * Added a sparse matrix-vector multiply routine to the sparse array operations. * Cleaned up header files and modified laplace.x test case to allocation more memory in MA. * Fixed up a bug in sparse array assembly operation. * Adding asynchronous implementations to repository. * Added BiCG-STAB implementation to test code for sparse matrices. * Initial checkin of solver based on randomized Kaczmarz. * Initial checkin of asynchronous Kaczmarz solver. * Fixed up some bugs in Kaczmarz solve. It appears to run at this point. * Normalized row of A and b to improve solution. * Initialized internal array handles to invalid value and added some code to compare Kaczmarz solution to conjugate gradient. * Modified data layout so that processor blocks are laid out consecutively in distributed memory. * Fixed export of VTK visualization file. * Modified code so it is easy to switch back and forth from old slab distribution to block distribution and cleaned up output to VTK file. * Added some code to calculate the distribution of errors. * Added code to print out distribution of differences and print out differences between exact and Kaczmarz answers to VTK file. * Added routine to export sparse matrix to an ASCII file. * Added operations to get the diagonal of a sparse matrix, left multiply a sparse matrix with a diagonal matrix represented by a vector, and shift the diagonal of a sparse matrix by a constant amount. * Added function to create a duplicate of a sparse array. * Cleaned up sparse array operations so that they work for all data types and added operations to multiply a sparse matrix by a diagonal matrix. * Modified Makefile.am so that some test that have not been checked in are not being run. * Fixed up some bugs in shift_diag macros. * Fix up factorization routine. * Fix up fortran interface to handle pointers correctly. * Fixed up some bugs in fortran interface and added functionality to extract single sparse blocks from sparse array. * Capture some updates. * Capture some recent changes. * Added sprs_test.c file to repository to fix compilation error in CI. * Removed randomcg from testing. * Removed additional asynchronous algorithms that don't work from testing. * Initial checkin of j_iter.c * Capture latest changes to matrix-matrix multiply routine. Currently compiles but not tested to see if it works. * Added matrix-matrix multiply operation to sparse array library. * Modified code so that buffers for matrix-matrix multiply are preallocated. This eliminates the need to keep resizing buffers on the fly. * Added tests to verify all non-zeros appear in matrix-matrix multiply and put timers on all sparse matrix operations. * Fixed bug in add element routine that was not correctly resizing arrays. * Fixed up some additional bugs with temporary arrays for holding sparse array indices. * Added fixes to sparse matrix-matrix multiply operation. * Added functionality to extract column from sparse matrix. * Fixed up count_sketch function and added test for it to sprs_test.c * Added files for random number generator based on Mersenne twister and a file implementing count sketch algorithm. * Add file implementing random Gram-Schmidt orthogonalization algorithm. * Replaced ran3 random number generator with Mersenne twister implementation and added test for routines implementing count sketch algorithm. * Added Mersenne twister to build files, fixed up sparse array export module and added some minor bug fixes. * Checking in some fixes for linear arrays and capturing current state of random Gram-Schmidt orthogonalization code. * Added test for random number generator. * Added test for random number generator to build. * Added new functionality for mixed sparse-dense operations. * Added synchronization and mask variables to all global operations. * fix NGA_Sprs_array_access_col_block64 definition * [cmake] new routines for sparse arrays * Fixed up a few problem so that test suite runs. * Added sparse to dense conversion routine to sparse matrix api. * Initial check in to save changes. Code does not work. * Adding more functionality to sparse arrays. The array class builds but has not been tested. * Added sparse array routines to user interface and to the build system. * Test program for sparse array functionality. * Code works on 1 processor. Saving changes. * Checking in code that works on one and two processors. * Tests are now running up to 3 processors * Adding some debugging prints. * Fixed data type mismatch. * Fixed up a bug in the add element function, removed prints and increased size of test problem. * Fixed up test of matrix-vector multiply. Still need to get a consistent handling of indexing. * Fixed up indexing so that everthing is zero base. * Modified code to do a better job of handling integer sizes in C-interface. * Added some modifications to build and sparse array to support test case that solves Laplace's equation using a conjugate gradient algorithm. * Added test case to solve Laplace's equation using conjugate gradient algorithm. * Added some code so you can write out a VTK formatted file containing the solution. This can be visualized using something like VisIt or Paraview. * Added a sparse matrix-vector multiply routine to the sparse array operations. * Cleaned up header files and modified laplace.x test case to allocation more memory in MA. * Fixed up a bug in sparse array assembly operation. * Adding asynchronous implementations to repository. * Added BiCG-STAB implementation to test code for sparse matrices. * Initial checkin of solver based on randomized Kaczmarz. * Initial checkin of asynchronous Kaczmarz solver. * Fixed up some bugs in Kaczmarz solve. It appears to run at this point. * Normalized row of A and b to improve solution. * Initialized internal array handles to invalid value and added some code to compare Kaczmarz solution to conjugate gradient. * Modified data layout so that processor blocks are laid out consecutively in distributed memory. * Fixed export of VTK visualization file. * Modified code so it is easy to switch back and forth from old slab distribution to block distribution and cleaned up output to VTK file. * Added some code to calculate the distribution of errors. * Added code to print out distribution of differences and print out differences between exact and Kaczmarz answers to VTK file. * Added routine to export sparse matrix to an ASCII file. * Added operations to get the diagonal of a sparse matrix, left multiply a sparse matrix with a diagonal matrix represented by a vector, and shift the diagonal of a sparse matrix by a constant amount. * Added function to create a duplicate of a sparse array. * Cleaned up sparse array operations so that they work for all data types and added operations to multiply a sparse matrix by a diagonal matrix. * Modified Makefile.am so that some test that have not been checked in are not being run. * Fixed up some bugs in shift_diag macros. * Fix up factorization routine. * Fix up fortran interface to handle pointers correctly. * Fixed up some bugs in fortran interface and added functionality to extract single sparse blocks from sparse array. * Capture some updates. * Capture some recent changes. * Added sprs_test.c file to repository to fix compilation error in CI. * Removed randomcg from testing. * Removed additional asynchronous algorithms that don't work from testing. * Initial checkin of j_iter.c * Capture latest changes to matrix-matrix multiply routine. Currently compiles but not tested to see if it works. * Added matrix-matrix multiply operation to sparse array library. * Modified code so that buffers for matrix-matrix multiply are preallocated. This eliminates the need to keep resizing buffers on the fly. * Added tests to verify all non-zeros appear in matrix-matrix multiply and put timers on all sparse matrix operations. * Fixed bug in add element routine that was not correctly resizing arrays. * Fixed up some additional bugs with temporary arrays for holding sparse array indices. * Added fixes to sparse matrix-matrix multiply operation. * Added functionality to extract column from sparse matrix. * Fixed up count_sketch function and added test for it to sprs_test.c * Added files for random number generator based on Mersenne twister and a file implementing count sketch algorithm. * Add file implementing random Gram-Schmidt orthogonalization algorithm. * Replaced ran3 random number generator with Mersenne twister implementation and added test for routines implementing count sketch algorithm. * Added Mersenne twister to build files, fixed up sparse array export module and added some minor bug fixes. * Checking in some fixes for linear arrays and capturing current state of random Gram-Schmidt orthogonalization code. * Added test for random number generator. * Added test for random number generator to build. * Added new functionality for mixed sparse-dense operations. * Added synchronization and mask variables to all global operations. * Initial check in to save changes. Code does not work. * Added sparse array routines to user interface and to the build system. * Code works on 1 processor. Saving changes. * Checking in code that works on one and two processors. * Tests are now running up to 3 processors * Adding some debugging prints. * Fixed data type mismatch. * Fixed up a bug in the add element function, removed prints and increased size of test problem. * Modified code to do a better job of handling integer sizes in C-interface. * Added some modifications to build and sparse array to support test case that solves Laplace's equation using a conjugate gradient algorithm. * Added a sparse matrix-vector multiply routine to the sparse array operations. * Cleaned up header files and modified laplace.x test case to allocation more memory in MA. * Fixed up a bug in sparse array assembly operation. * Initial checkin of solver based on randomized Kaczmarz. * Fixed up some bugs in Kaczmarz solve. It appears to run at this point. * Normalized row of A and b to improve solution. * Initialized internal array handles to invalid value and added some code to compare Kaczmarz solution to conjugate gradient. * Added some code to calculate the distribution of errors. * Added routine to export sparse matrix to an ASCII file. * Added function to create a duplicate of a sparse array. * Cleaned up sparse array operations so that they work for all data types and added operations to multiply a sparse matrix by a diagonal matrix. * Fixed up some bugs in shift_diag macros. * Fix up fortran interface to handle pointers correctly. * Capture latest changes to matrix-matrix multiply routine. Currently compiles but not tested to see if it works. * Added matrix-matrix multiply operation to sparse array library. * Modified code so that buffers for matrix-matrix multiply are preallocated. This eliminates the need to keep resizing buffers on the fly. * Fixed bug in add element routine that was not correctly resizing arrays. * Fixed up some additional bugs with temporary arrays for holding sparse array indices. * Added fixes to sparse matrix-matrix multiply operation. * Added functionality to extract column from sparse matrix. * Fixed up count_sketch function and added test for it to sprs_test.c * Added Mersenne twister to build files, fixed up sparse array export module and added some minor bug fixes. * Checking in some fixes for linear arrays and capturing current state of random Gram-Schmidt orthogonalization code. * Added new functionality for mixed sparse-dense operations. * Added synchronization and mask variables to all global operations. * fix NGA_Sprs_array_access_col_block64 definition * [cmake] new routines for sparse arrays * Fixed up a few problem so that test suite runs. * Added sparse to dense conversion routine to sparse matrix api. * Fixed up some problems after rebasing branch. --------- Co-authored-by: bjpalmer <d3g293@prusik.pnl.gov> Co-authored-by: Bruce J Palmer <d3g293@constance04.pnl.gov> Co-authored-by: Bruce J Palmer <d3g293@constance-e.pnl.gov> Co-authored-by: Bruce J Palmer <d3g293@constance03.pnl.gov> Co-authored-by: Bruce J Palmer <d3g293@constance01.pnl.gov> Co-authored-by: Bruce J Palmer <d3g293@deception03.pnl.gov> Co-authored-by: Bruce J Palmer <d3g293@deception01.pnl.gov> Co-authored-by: Palmer <d3g293@we36220.pnl.gov> Co-authored-by: Ajay Panyala <ajay.panyala@gmail.com> Co-authored-by: edoapra <edoardo.apra@gmail.com> Co-authored-by: Bruce J Palmer <d3g293@deception02.pnl.gov>
- Loading branch information