Blame view
fvn_sparse/UMFPACK/Source/umfpack_report_status.c
3.75 KB
422234dc3
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
/* ========================================================================== */ /* === UMFPACK_report_status ================================================ */ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ /* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ /* User-callable. Prints the return value from other UMFPACK_* routines. See umfpack_report_status.h for details. */ #include "umf_internal.h" GLOBAL void UMFPACK_report_status ( const double Control [UMFPACK_CONTROL], Int status ) { Int prl ; /* ---------------------------------------------------------------------- */ /* get control settings and status to determine what to print */ /* ---------------------------------------------------------------------- */ prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl < 1) { /* no output generated if prl is less than 1 */ return ; } if (status == UMFPACK_OK && prl <= 1) { /* no output generated if prl is 1 or less and no error occurred. */ /* note that the default printing level is 1. */ return ; } /* ---------------------------------------------------------------------- */ /* print umfpack license, copyright, version, and status condition */ /* ---------------------------------------------------------------------- */ PRINTF ((" ")) ; PRINTF4 (("%s ", UMFPACK_COPYRIGHT)) ; PRINTF6 (("%s", UMFPACK_LICENSE_PART1)) ; PRINTF6 (("%s", UMFPACK_LICENSE_PART2)) ; PRINTF6 (("%s", UMFPACK_LICENSE_PART3)) ; PRINTF (("UMFPACK V%d.%d.%d (%s): ", UMFPACK_MAIN_VERSION, UMFPACK_SUB_VERSION, UMFPACK_SUBSUB_VERSION, UMFPACK_DATE)) ; switch (status) { case UMFPACK_OK: PRINTF (("OK ")) ; break ; case UMFPACK_WARNING_singular_matrix: PRINTF (("WARNING: matrix is singular ")) ; break ; case UMFPACK_ERROR_out_of_memory: PRINTF (("ERROR: out of memory ")) ; break ; case UMFPACK_ERROR_invalid_Numeric_object: PRINTF (("ERROR: Numeric object is invalid ")) ; break ; case UMFPACK_ERROR_invalid_Symbolic_object: PRINTF (("ERROR: Symbolic object is invalid ")) ; break ; case UMFPACK_ERROR_argument_missing: PRINTF (("ERROR: required argument(s) missing ")) ; break ; case UMFPACK_ERROR_n_nonpositive: PRINTF (("ERROR: dimension (n_row or n_col) must be > 0 ")) ; break ; case UMFPACK_ERROR_invalid_matrix: PRINTF (("ERROR: input matrix is invalid ")) ; break ; case UMFPACK_ERROR_invalid_system: PRINTF (("ERROR: system argument invalid ")) ; break ; case UMFPACK_ERROR_invalid_permutation: PRINTF (("ERROR: invalid permutation ")) ; break ; case UMFPACK_ERROR_different_pattern: PRINTF (("ERROR: pattern of matrix (Ap and/or Ai) has changed ")) ; break ; case UMFPACK_ERROR_internal_error: PRINTF (("INTERNAL ERROR! " "Input arguments might be corrupted or aliased, or an internal " "error has occurred. Check your input arguments with the " "umfpack_*_report_* routines before calling the umfpack_* " "computational routines. Recompile UMFPACK with debugging " "enabled, and look for failed assertions. If all else fails " "please report this error to Tim Davis (davis@cise.ufl.edu). " )) ; break ; default: PRINTF (("ERROR: Unrecognized error code: "ID" ", status)) ; } PRINTF ((" ")) ; } |