Examples
bench_spmv.c: Driver for benchmarking SpMV.";
cJSON.c:
cJSON.h:
ex1.c: Tests LU, Cholesky, and QR factorization and MatMatSolve() for a sequential dense matrix.
ex10.c: Tests repeated use of assembly for matrices.
ex100.c: Tests various routines in MatMAIJ format.
ex101.c: Testing PtAP for SeqMAIJ matrix, P, with SeqAIJ matrix, A.
ex102.c: Tests MatCreateLRC()
ex103.c: Test MatSetValues() by converting MATDENSE to MATELEMENTAL.
ex104.c: Test MatMatMult(), MatTranspose(), MatTransposeMatMult() for Dense and Elemental matrices.
ex105f.F90:
ex106.c: Test repeated LU factorizations. Used for checking memory leak
ex107.c: Test MatCreate() with MAT_STRUCTURE_ONLY .
ex108.c: Testing MatCreateSeqBAIJWithArrays() and MatCreateSeqSBAIJWithArrays().
ex109.c: Test MatMatMult() for AIJ and Dense matrices.
ex11.c: Tests the use of MatZeroRows() for uniprocessor matrices.
ex110.c: Testing MatCreateMPIAIJWithSplitArrays().
ex111.c: Tests sequential and parallel MatMatMatMult() and MatPtAP(). Modified from ex96.c
ex112.c: Test sequential FFTW interface
ex113.c: Tests sequential and parallel MatMatMult() and MatAXPY(...,SUBSET_NONZERO_PATTERN)
ex114.c: Tests MatGetRowMax(), MatGetRowMin(), MatGetRowMaxAbs()
ex115.c: Tests MatHYPRE
ex116.c: Test LAPACK routine DSYEV() or DSYEVX().
ex117.c: Tests Cholesky factorization for a SBAIJ matrix, (bs=2).
ex118.c: Test LAPACK routine DSTEBZ() and DTEIN().
ex119.c: Tests binary MatView() for MPIDENSE matrices
ex12.c: Tests the use of MatZeroRows() for parallel matrices.
ex120.c: Test LAPACK routine ZHEEV, ZHEEVX, ZHEGV and ZHEGVX.
ex120f.F90:
ex121.c: Test sequential FFTW convolution
ex122.c: Test MatMatMult() for AIJ and Dense matrices.
ex123.c: Test MatSetPreallocationCOO and MatSetValuesCOO
ex124.c: Check the difference of the two matrices
ex125.c: Tests MatSolve() and MatMatSolve() (interface to superlu_dist, mumps and mkl_pardiso).
ex126f.F90:
ex127.c: Test MatMult() for Hermitian matrix.
ex128.c: Tests ILU and ICC factorization with and without matrix ordering on seqsbaij format. Modified from ex30.c
ex129.c:
ex13.c: Tests copying and ordering uniprocessor row-based sparse matrices.
ex130.c: Tests external direct solvers. Simplified from ex125.c
ex131.c: Tests MatMult() on MatLoad() matrix
ex132.c: Test MatAXPY()
ex133.c: Test saving SeqSBAIJ matrix that is missing diagonal entries.";
ex134.c: Test parallel assembly of SBAIJ matrices
ex135.c: Test parallel assembly of SBAIJ matrices
ex136.c: Tests MatLoad() MatView() for MPIBAIJ.
ex137.c: Tests MatCreateMPISBAIJWithArrays().
ex138.c: Tests MatGetColumnNorms()/Sums()/Means() for matrix read from file.";
ex139.c: Test MatCreateLocalRef()
ex14.c: Tests sequential and parallel MatGetRow() and MatRestoreRow().
ex140.c: Tests MATPYTHON from C
ex141.c: Tests converting a SBAIJ matrix to BAIJ format with MatConvert. Modified from ex55.c
ex142.c: Test sequential r2c/c2r FFTW without PETSc interface
ex143.c: Illustrate how to use mpi FFTW and PETSc-FFTW interface
ex144.c:
ex145.c: Tests LU, Cholesky factorization and MatMatSolve() for an Elemental dense matrix.
ex146.c:
ex147.c:
ex148.c: This program illustrates the use of PETSc-fftw interface for real 2D DFT.
ex149.c: This program illustrates the use of PETSc-fftw interface for real DFT
ex15.c: Tests MatNorm(), MatLUFactor(), MatSolve() and MatSolveAdd().
ex150.c: This program illustrates the use of PETSc-fftw interface for real DFT
ex151.c: Tests MatPermute() in parallel.
ex152.c: Test ParMETIS handling of negative weights.
ex153.c: This program illustrates the use of PETSc-fftw interface for sequential real DFT
ex154.c: Tests MatMatSolve() in Schur complement mode.
ex155.c: This program illustrates the use of PETSc-fftw interface for parallel real DFT
ex156.c: Tests resetting preallocation after filling the full sparsity pattern";
ex157.c: This program illustrates the use of PETSc-fftw interface for parallel real DFT
ex158.c: Illustrate how to use mpi FFTW and PETSc-FFTW interface
ex159.c: Test MatGetLocalSubMatrix() with multiple levels of nesting.
ex16.c: Tests MatDenseGetArray() and MatView()/MatLoad() with binary viewers.
ex160.c: Tests MatMPIBAIJ format in sequential run
ex161.c: Test MatTransposeColoring for SeqAIJ matrices. Used for '-matmattransmult_color' on MatMatTransposeMult
ex162.c: Tests MatShift for SeqAIJ matrices with some missing diagonal entries
ex163.c: Tests MatTransposeMatMult() on MatLoad() matrix
ex164.c: Tests MatConvert() from SeqDense to SeqAIJ
ex165.c: Tests C=A^T*B via MatTranspose() and MatMatMult().
ex166.c: Tests MatPermute() for a square matrix in parallel.
ex167.c: Extract submatrices using unsorted indices. For SEQSBAIJ either sort both rows and columns, or sort none.
ex168.c: Tests external Clique direct solvers. Simplified from ex130.c
ex169.c: Test memory leak when duplicating a redundant matrix.
ex16f90.F90:
ex17.c: Tests the use of MatSolveTranspose().
ex170.c: Scalable algorithm for Connected Components problem.
ex171.c: Tests MatDiagonalSet() on MatLoad() matrix
ex171f.F90:
ex172.c: Test MatAXPY and SUBSET_NONZERO_PATTERN [-different] [-skip]
ex173.c: Test MatrixMarket outputting.
ex174.cxx: Tests MatConvert(), MatLoad() for MATELEMENTAL interface.
ex175.c: Tests MatCreateHermitianTranspose().
ex176.c: Tests MatCreateMPIAIJWithArrays() and MatUpdateMPIAIJWithArray()
ex177.c: Tests various routines in MatKAIJ format.
ex178.c: Tests MatInvertVariableBlockEnvelope()
ex179.c: Tests MatTranspose() with MAT_REUSE_MATRIX and different nonzero pattern
ex18.c: Tests the use of MatZeroRowsColumns() for parallel matrices.
ex180.c: Tests MatLoad() with blocksize set in program
ex181.c: Tests MatCreateSubmatrix() with entire matrix, modified from ex59.c.";
ex182.c: Tests using MatShift() to create a constant diagonal matrix
ex183.c: Example of extracting an array of MPI submatrices from a given MPI matrix.
ex184.c: Example of inverting a block diagonal matrix.
ex185.c: Tests MatCreateConstantDiagonal().
ex19.c: Tests reusing MPI parallel matrices and MatGetValues().
ex190.c: Tests MatLoad() with uneven dimensions set in program
ex191.c: Tests MatLoad() for dense matrix with uneven dimensions set in program
ex192.c: Tests MatSolve() and MatMatSolve() with MUMPS or MKL_PARDISO sequential solvers in Schur complement mode.
ex193.c:
ex194.c: Tests MatCreateSubmatrix() with certain entire rows of matrix, modified from ex181.c.";
ex195.c:
ex196f90.F90:
ex197.c: Test MatMultHermitianTranspose() and MatMultHermitianTransposeAdd().
ex198.c: Test MatMatMatMult
ex199.c: Tests the different MatColoring implementations.
ex1k.kokkos.cxx: Benchmarking MatMult() with AIJ and its subclass matrix types
ex2.c: Tests MatTranspose(), MatNorm(), MatAXPY() and MatAYPX().
ex20.c: Tests converting a matrix to another format with MatConvert().
ex200.c:
ex201f.F90:
ex202.c: Tests the use of MatTranspose_Nest and MatMatMult_Nest_Dense
ex203.c: Tests incorrect use of MatDiagonalSet() for SHELL matrices
ex204.c: Test ViennaCL Matrix Conversions";
ex205.c: Tests MatCopy() for SHELL matrices
ex206.c: Reads binary matrix - twice
ex207.c: Test MatCreateRedundantMatrix for a BAIJ matrix.
ex208.c: Test MatCreateRedundantMatrix for rectangular matrix.
ex209.c: Test MatTransposeMatMult()
ex209f.F90:
ex21.c: Tests converting a parallel AIJ formatted matrix to the parallel Row format.
ex210.c: Test MatCreateNest with block sizes.
ex211.c: Tests MatCreateSubmatrix() in parallel.";
ex212.c: Test MatCreateSubMatrix with -mat_type nest and block sizes.
ex212f.F90:
ex213.c: Tests MatMPIBAIJSetPreallocationCSR()
ex214.c: Tests MatMatSolve() and MatMatTransposeSolve() for computing inv(A) with MUMPS.
ex215.c: Tests MatSolve(), MatSolveTranspose() and MatMatSolve() with SEQDENSE
ex216.c:
ex218.c: Tests MatShellTestMult()
ex219f.F90:
ex22.c: Tests matrix ordering routines.
ex220.c:
ex221.c: Tests various routines for MATSHELL
ex222.c: Tests MatComputeOperator() and MatComputeOperatorTranspose()
ex225.c: Test Hypre matrix APIs
ex226.c: Benchmark for MatMatMult() of AIJ matrices using different 2d finite-difference stencils.
ex227.c: Test MatNullSpaceTest() with options prefixes.
ex228.c: Test duplication/destruction of FFTW vecs
ex229.c: Test MATMFFD for the rectangular case
ex23.c: Tests the use of interface functions for MATIS matrices and conversion routines.
ex230.c: Example of using MatPreallocator
ex231.cxx: A test for MatAssembly that heavily relies on PetscSortIntWithArrayPair
ex232.c:
ex233.c: Tests MatMPI{AIJ,BAIJ,SBAIJ}SetPreallocationCSR
ex234.c: Basic test of various routines with SBAIJ matrices
ex235.c: Test combinations of scalings, shifts and get diagonal of MATSHELL
ex236.c: Test CPU/GPU memory leaks, MatMult and MatMultTransposeAdd during successive matrix assemblies
ex237.c: Mini-app to benchmark matrix--matrix multiplication
ex238.c: Creates MatSeqBAIJ matrix of given BS for timing tests of MatMult().
ex239.c: Test device/host memory allocation in MatDenseSeqCUDA()
ex24.c: Tests the different MatColoring implementations and ISColoringTestValid()
ex240.c: Tests MatFDColoringSetValues()
ex241.c: Tests MATHTOOL
ex241f.F90:
ex242.c: Tests ScaLAPACK interface.
ex243.c: Test conversion of ScaLAPACK matrices.
ex244.cxx: Tests MatConvert(), MatLoad() for MATSCALAPACK interface.
ex245.c: Tests LU, Cholesky factorization and MatMatSolve() for a ScaLAPACK dense matrix.
ex246.cxx: Tests MATHTOOL with a derived htool::IMatrix
ex247.c: Tests MATCENTERING matrix type.
ex248.c: Tests MatSeqAIJKron.
ex249.c: Test MatCreateSubMatrices
ex25.c: Tests MatTranspose()
ex250.c: Test Mat products
ex251.c: Test MatAXPY
ex252.c: Test MatZeroEntries() on unassembled matrices
ex253.c: Tests MatMultHermitianTranspose() for real numbers.
ex254.c: Test MatSetValuesCOO for MPIAIJ and its subclasses
ex255.c: Tests MatConvert from AIJ to MATIS with a block size greater than 1.
ex256.c: Test some operations of SeqDense matrices with an LDA larger than M.
ex257.c: Test MatDenseGetSubMatrix() on a CUDA matrix.
ex258.c: Test MatProductReplaceMats()
ex259.c: Test of setting values in a matrix without preallocation
ex26.c: Tests MatGetRowIJ for SeqAIJ, SeqBAIJ and SeqSBAIJ
ex260.c: Tests that MatView() and MatLoad() work for MPIAIJ matrix with total nz > PETSC_INT_MAX
ex261.c: Tests MatGetDiagonal().
ex262f.F90:
ex263.c: Tests MatForwardSolve and MatBackwardSolve for LU and Cholesky decompositions using C/Pardiso.
ex264.c: Test MatConvert() with a MATNEST with scaled and shifted MATTRANSPOSEVIRTUAL blocks.
ex265.c: Tests inserting new block into SBAIJ and BAIJ matrix
ex266.c: Test MatDuplicate() with new nonzeros on the duplicate
ex267.c: Test different MatSolve routines with MATTRANSPOSEVIRTUAL.
ex268.c: Tests MATFACTORHTOOL
ex27.c: Test MatSetRandom on MATMPIAIJ matrices
ex28.c: Illustrate how to do one symbolic factorization and multiple numeric factorizations using same matrix nonzero structure.
ex29.c: Tests PetscHeapCreate()
ex2k.kokkos.cxx: Benchmarking MatProduct with AIJ and its subclass matrix types
ex3.c: Tests relaxation for dense matrices.
ex30.c: Tests ILU and ICC factorization with and without matrix ordering on seqaij format, and illustrates drawing of matrix sparsity structure with MatView().
ex300.c: Show MatShift BUG happening after copying a matrix with no rows on a process";
ex301.c: Tests for bugs in A->offloadmask consistency for GPU matrices
ex31.c: Tests binary I/O of matrices and illustrates user-defined event logging.
ex32.c: Tests MATSEQDENSECUDA
ex33.c: Test memory scalability of MatMatMult() for AIJ and DENSE matrices.
ex34.c: Test MatMatMult() and MatTransposeMatMult() for MPIAIJ and MPIDENSE matrices.
ex35.c: Tests MatCreateSubMatrices().
ex36f.F90:
ex37.c: Tests MatCopy() and MatStore/RetrieveValues().
ex38.c: Test interface of Elemental.
ex39.c: Tests Elemental interface.
ex4.c: Creates a matrix, inserts some values, and tests MatCreateSubMatrices() and MatZeroEntries().
ex40.c: Tests the parallel case for MatIncreaseOverlap(). Input arguments are:
ex41.c: Tests MatIncreaseOverlap() - the parallel case. This example
ex42.c: Tests MatIncreaseOverlap() and MatCreateSubmatrices() for the parallel case.
ex43.c: Saves a dense matrix in a dense format (binary).
ex44.c: Tests MatView()/MatLoad() with binary viewers for AIJ matrices.
ex45.c: Tests MatView()/MatLoad() with binary viewers for BAIJ matrices.
ex46.c: Tests late MatSetBlockSizes.
ex47.c: Tests the various routines in MatBAIJ format.
ex48.c: Tests various routines in MatSeqBAIJ format.
ex49.c: Tests MatTranspose(), MatNorm(), and MatAXPY().
ex5.c: Tests MatMult(), MatMultAdd(), MatMultTranspose().
ex50.c: Tests MatView()/MatLoad() with binary viewers for SBAIJ matrices.
ex51.c: Tests MatIncreaseOverlap(), MatCreateSubMatrices() for MatBAIJ format.
ex52.c: Tests various routines in MatMPIBAIJ format.
ex53.c: Tests various routines in MatMPIBAIJ format.
ex54.c: Tests MatIncreaseOverlap(), MatCreateSubMatrices() for parallel AIJ and BAIJ formats.
ex55.c: Tests converting a matrix to another format with MatConvert().
ex56.c: Test the use of MatSetValuesBlocked(), MatZeroRows() for rectangular MatBAIJ matrix, test MatSetValuesBlocked() for MatSBAIJ matrix (-test_mat_sbaij).";
ex57.c: Reads in a binary file, extracts a submatrix from it, and writes to another binary file.
ex58.c: Tests MatTranspose() and MatEqual() for MPIAIJ matrices.
ex58f.F90:
ex59.c: Tests MatCreateSubmatrix() in parallel.";
ex6.c: Tests reordering a matrix.
ex60.c: Tests MatGetColumnVector().";
ex61.c: Tests MatSeq(B)AIJSetColumnIndices().
ex62.c: Test Matrix products for AIJ matrices
ex63f.F90:
ex64.c: Saves 4by4 block matrix.
ex65.c: Saves a rectangular sparse matrix to disk.
ex66.c: Tests MATH2OPUS
ex67f.F90:
ex68.c: Tests MatReorderForNonzeroDiagonal().
ex69.c: Tests MatCreateDenseCUDA(), MatDenseCUDAPlaceArray(), MatDenseCUDAReplaceArray(), MatDenseCUDAResetArray()
ex7.c: Tests matrix factorization. Note that most users should
ex70.c:
ex71.c: Passes a sparse matrix to MATLAB.
ex72.c: Read a non-complex sparse matrix from a Matrix Market (v. 2.0) file
ex73.c: Reads a PETSc matrix from a file partitions it
ex74.c: Tests the various sequential routines in MATSEQSBAIJ format.
ex75.c: Tests various routines in MatMPISBAIJ format.
ex76.c: Tests cholesky, icc factorization and solve on sequential aij, baij and sbaij matrices.
ex77.c: Tests the various sequential routines in MatSBAIJ format. Same as ex74.c except diagonal entries of the matrices are zeros.
ex78.c: Reads in a matrix in ASCII MATLAB format (I,J,A), read in vectors rhs and exact_solu in ASCII format.
ex79f.F90:
ex8.c: Tests automatic allocation of matrix storage space.
ex80.c: Partition tiny grid.
ex81.c: Tests MatOption MAT_FORCE_DIAGONAL_ENTRIES.
ex82.c: Partition a tiny grid using hierarchical partitioning.
ex83.c: Partition tiny grid using hierarchical partitioning and increase overlap using MatIncreaseOverlapSplit.
ex84.c:
ex85f.F90:
ex86.c: Testing MatCreateMPIMatConcatenateSeqMat().
ex87.c: Tests MatCreateSubMatrices() for SBAIJ matrices
ex88.c: Tests MatShift(), MatScale(), and MatDiagonalScale() for SHELL and NEST matrices
ex89.c: Tests MatPtAP() for MPIMAIJ and MPIAIJ
ex9.c: Tests MPI parallel matrix creation. Test MatCreateRedundantMatrix()
ex90.c: Tests MatPtAP()
ex91.c: Tests MatIncreaseOverlap(), MatCreateSubMatrices() for sequential MatSBAIJ format. Derived from ex51.c
ex92.c: Tests MatIncreaseOverlap(), MatCreateSubMatrices() for parallel MatSBAIJ format.
ex93.c: Test MatMatMult() and MatPtAP() for AIJ matrices.
ex94.c: Tests sequential and parallel MatMatMult() and MatPtAP(), MatTransposeMatMult(), sequential MatMatTransposeMult(), MatRARt()
ex95.c: Testing MatCreateMPIAIJSumSeqAIJ().
ex96.c: Tests sequential and parallel DMCreateMatrix(), MatMatMult() and MatPtAP()
ex97.c: Tests MatCreateSubMatrix with MatSubMatrix versus MatAIJ, non-square
ex98.c: Tests MatMPIAIJSetPreallocationCSR()
ex99.c: Tests MatCreateSubMatrix with MatSubMatrix versus MatAIJ, square, shifted (copied from ex97)
mmio.c:
mmio.h:
mmloader.c:
mmloader.h:
tmpbench.c: Benchmark dense matrix LU factorization (BLAS/LAPACK)