FLA_Error.c File Reference

(r)


Functions

char * FLA_Error_string_for_code (int code)
void FLA_Error_messages_init (void)
void FLA_Print_message (char *str, char *file, int line)
void FLA_Abort (void)
void FLA_F2C() fla_abort_f (void)

Variables

char fla_error_string [FLA_MAX_NUM_ERROR_MSGS][FLA_MAX_ERROR_MSG_LENGTH]

Function Documentation

void FLA_Abort ( void   ) 

Referenced by fla_abort_f(), FLA_Check_error_code_helper(), FLASH_Apply_Q_UT_inc_create_workspace(), FLASH_FS_incpiv(), FLASH_LU_incpiv(), FLASH_LU_incpiv_create_hier_matrices(), and FLASH_QR_UT_inc_create_hier_matrices().

00241 {
00242     fprintf( stderr, "libflame: Aborting.\n");
00243     //raise( SIGABRT );
00244     abort();
00245 }

void FLA_F2C() fla_abort_f ( void   ) 

References FLA_Abort().

00248 {
00249     FLA_Abort();
00250 }

void FLA_Error_messages_init ( void   ) 

References FLA_Error_string_for_code().

Referenced by FLA_Init().

00057 {
00058     sprintf( FLA_Error_string_for_code(FLA_INVALID_SIDE),
00059              "Invalid side parameter value." );
00060     sprintf( FLA_Error_string_for_code(FLA_INVALID_UPLO),
00061              "Invalid uplo parameter value." );
00062     sprintf( FLA_Error_string_for_code(FLA_INVALID_TRANS),
00063              "Invalid trans parameter value." );
00064     sprintf( FLA_Error_string_for_code(FLA_INVALID_TRANS_GIVEN_DATATYPE),
00065              "Invalid trans value (FLA_CONJ_TRANSPOSE|FLA_CONJ_NO_TRANSPOSE) for given non-complex object datatype" );
00066     sprintf( FLA_Error_string_for_code(FLA_INVALID_CONJ),
00067              "Invalid conjugate parameter value." );
00068     sprintf( FLA_Error_string_for_code(FLA_INVALID_DIRECT),
00069              "Invalid direction parameter value." );
00070     sprintf( FLA_Error_string_for_code(FLA_INVALID_STOREV),
00071              "Invalid storev parameter value." );
00072     sprintf( FLA_Error_string_for_code(FLA_INVALID_DATATYPE),
00073              "Invalid datatype value." );
00074     sprintf( FLA_Error_string_for_code(FLA_INVALID_INTEGER_DATATYPE),
00075              "Invalid integer datatype value." );
00076     sprintf( FLA_Error_string_for_code(FLA_INVALID_REAL_DATATYPE),
00077              "Invalid real datatype value." );
00078     sprintf( FLA_Error_string_for_code(FLA_INVALID_COMPLEX_DATATYPE),
00079              "Invalid complex datatype value." );
00080     sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_INTEGER),
00081              "Expected integer object." );
00082     sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_REAL),
00083              "Expected real object." );
00084     sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_COMPLEX),
00085              "Expected complex object." );
00086     sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_SQUARE),
00087              "Expected square matrix object." );
00088     sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_SCALAR),
00089              "Expected scalar object." );
00090     sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_VECTOR),
00091              "Expected vector object." );
00092     sprintf( FLA_Error_string_for_code(FLA_INCONSISTENT_DATATYPES),
00093              "Detected inconsistent object datatypes." );
00094     sprintf( FLA_Error_string_for_code(FLA_NONCONFORMAL_DIMENSIONS),
00095              "Detected inconsistent object dimensions." );
00096     sprintf( FLA_Error_string_for_code(FLA_UNEQUAL_VECTOR_LENGTHS),
00097              "Detected vectors of unequal length." );
00098     sprintf( FLA_Error_string_for_code(FLA_INVALID_HESSENBERG_INDICES),
00099              "Detected invalid Hessenberg ilo/ihi indices." );
00100     sprintf( FLA_Error_string_for_code(FLA_INVALID_VECTOR_LENGTH),
00101              "Detected vector of unexpected length." );
00102     sprintf( FLA_Error_string_for_code(FLA_NULL_POINTER),
00103              "Encountered NULL pointer." );
00104     sprintf( FLA_Error_string_for_code(FLA_SPECIFIED_OBJ_DIM_MISMATCH),
00105              "Specified dimensions do not match object dimensions." );
00106     sprintf( FLA_Error_string_for_code(FLA_SPECIFIED_OBJ_LDIM_MISMATCH),
00107              "Specified leading dim dimension does not match object leading dimension." );
00108     sprintf( FLA_Error_string_for_code(FLA_INVALID_PIVOT_TYPE),
00109              "Invalid pivot index type specified." );
00110     sprintf( FLA_Error_string_for_code(FLA_MALLOC_RETURNED_NULL_POINTER),
00111              "malloc() returned NULL pointer." );
00112     sprintf( FLA_Error_string_for_code(FLA_OBJECT_BASE_BUFFER_MISMATCH),
00113              "Detected a buffer address mismatch between adjacent objects." );
00114     sprintf( FLA_Error_string_for_code(FLA_OBJECTS_NOT_VERTICALLY_ADJ),
00115              "Object partitions not vertically adjacent." );
00116     sprintf( FLA_Error_string_for_code(FLA_OBJECTS_NOT_HORIZONTALLY_ADJ),
00117              "Object partitions not horizontally adjacent." );
00118     sprintf( FLA_Error_string_for_code(FLA_ADJACENT_OBJECT_DIM_MISMATCH),
00119              "Object partitions have mismatched dimensions." );
00120     sprintf( FLA_Error_string_for_code(FLA_OBJECTS_NOT_VERTICALLY_ALIGNED),
00121              "Object partitions not vertically aligned." );
00122     sprintf( FLA_Error_string_for_code(FLA_OBJECTS_NOT_HORIZONTALLY_ALIGNED),
00123              "Object partitions not horizontally aligned." );
00124     sprintf( FLA_Error_string_for_code(FLA_INVALID_FLOATING_DATATYPE),
00125              "Expected single or double-precision real or complex datatype value." );
00126     sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_FLOATING_POINT),
00127              "Expected single or double-precision real or complex object." );
00128     sprintf( FLA_Error_string_for_code(FLA_INVALID_BLOCKSIZE_VALUE),
00129              "Detected blocksize value less than or equal to zero." );
00130     sprintf( FLA_Error_string_for_code(FLA_OPEN_RETURNED_ERROR),
00131              "open() returned bad file descriptor." );
00132     sprintf( FLA_Error_string_for_code(FLA_LSEEK_RETURNED_ERROR),
00133              "lseek() returned error." );
00134     sprintf( FLA_Error_string_for_code(FLA_CLOSE_RETURNED_ERROR),
00135              "close() returned error." );
00136     sprintf( FLA_Error_string_for_code(FLA_UNLINK_RETURNED_ERROR),
00137              "unlink() returned error." );
00138     sprintf( FLA_Error_string_for_code(FLA_READ_RETURNED_ERROR),
00139              "read() returned error." );
00140     sprintf( FLA_Error_string_for_code(FLA_WRITE_RETURNED_ERROR),
00141              "write() returned error." );
00142     sprintf( FLA_Error_string_for_code(FLA_INVALID_QUADRANT),
00143              "Invalid quadrant parameter value." );
00144     sprintf( FLA_Error_string_for_code(FLA_NOT_YET_IMPLEMENTED),
00145              "Function or conditional branch/case not yet implemented." );
00146     sprintf( FLA_Error_string_for_code(FLA_EXPECTED_NONNEGATIVE_VALUE),
00147              "Expected non-negative value." );
00148     sprintf( FLA_Error_string_for_code(FLA_SUPERMATRIX_NOT_ENABLED),
00149              "SuperMatrix support must be enabled for this code to execute." );
00150     sprintf( FLA_Error_string_for_code(FLA_UNDEFINED_ERROR_CODE),
00151              "Undefined error code passed to FLA_Check_error_code()." );
00152     sprintf( FLA_Error_string_for_code(FLA_INVALID_DIAG),
00153              "Invalid diag parameter value." );
00154     sprintf( FLA_Error_string_for_code(FLA_INCONSISTENT_OBJECT_PRECISION),
00155              "Inconsistent precisions between objects." );
00156     sprintf( FLA_Error_string_for_code(FLA_INVALID_BLOCKSIZE_OBJ),
00157              "Encountered blocksize object containing value less than or equal to zero." );
00158     sprintf( FLA_Error_string_for_code(FLA_VECTOR_LENGTH_BELOW_MIN),
00159              "Detected vector length below pre-determined minimum." );
00160     sprintf( FLA_Error_string_for_code(FLA_PTHREAD_CREATE_RETURNED_ERROR),
00161              "pthread_create() returned error." );
00162     sprintf( FLA_Error_string_for_code(FLA_PTHREAD_JOIN_RETURNED_ERROR),
00163              "pthread_join() returned error." );
00164     sprintf( FLA_Error_string_for_code(FLA_INVALID_ISGN_VALUE),
00165              "Invalid value for isgn parameter (ie: |isgn| != 1)." );
00166     sprintf( FLA_Error_string_for_code(FLA_CHOL_FAILED_MATRIX_NOT_SPD),
00167              "FLA_Chol() failed due to negative diagonal element; matrix not SPD." );
00168     sprintf( FLA_Error_string_for_code(FLA_INVALID_ELEMTYPE),
00169              "Invalid object element type value." );
00170     sprintf( FLA_Error_string_for_code(FLA_POSIX_MEMALIGN_FAILED),
00171              "posix_memalign() returned error." );
00172     sprintf( FLA_Error_string_for_code(FLA_INVALID_SUBMATRIX_DIMS),
00173              "Invalid submatrix dimensions relative to parent matrix." );
00174     sprintf( FLA_Error_string_for_code(FLA_INVALID_SUBMATRIX_OFFSET),
00175              "Invalid submatrix offset relative to dimensions of submatrix and parent." );
00176     sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_SCALAR_ELEMTYPE),
00177              "Object element type is not FLA_SCALAR as expected." );
00178     sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_MATRIX_ELEMTYPE),
00179              "Object element type is not FLA_MATRIX as expected." );
00180     sprintf( FLA_Error_string_for_code(FLA_ENCOUNTERED_NON_POSITIVE_NTHREADS),
00181              "Encountered non-positive (zero) value for number of threads." );
00182     sprintf( FLA_Error_string_for_code(FLA_INVALID_CONJ_GIVEN_DATATYPE),
00183              "Invalid conj value (FLA_CONJUGATE) for given non-complex object datatype" );
00184     sprintf( FLA_Error_string_for_code(FLA_INVALID_COMPLEX_TRANS),
00185              "Invalid complex trans parameter value" );
00186     sprintf( FLA_Error_string_for_code(FLA_INVALID_REAL_TRANS),
00187              "Invalid real trans parameter value" );
00188     sprintf( FLA_Error_string_for_code(FLA_INVALID_BLAS_TRANS),
00189              "Invalid BLAS-style trans parameter value" );
00190     sprintf( FLA_Error_string_for_code(FLA_INVALID_NONCONSTANT_DATATYPE),
00191              "Invalid non-constant datatype value." );
00192     sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_NONCONSTANT),
00193              "Expected non-constant object." );
00194     sprintf( FLA_Error_string_for_code(FLA_INVALID_M_GIVEN_LDIM),
00195              "Given m dimension exceeds leading dimension." );
00196     sprintf( FLA_Error_string_for_code(FLA_OBJECT_DATATYPES_NOT_EQUAL),
00197              "Detected unequal object datatypes." );
00198     sprintf( FLA_Error_string_for_code(FLA_DIVIDE_BY_ZERO),
00199              "Encountered request to invert zero scalar object." );
00200     sprintf( FLA_Error_string_for_code(FLA_OBJECT_ELEMTYPES_NOT_EQUAL),
00201              "Detected unequal object elemtypes." );
00202     sprintf( FLA_Error_string_for_code(FLA_INVALID_PIVOT_INDEX_RANGE),
00203              "Invalid pivot index range." );
00204     sprintf( FLA_Error_string_for_code(FLA_HOUSEH_PANEL_MATRIX_TOO_SMALL),
00205              "Block-panel Householder matrix is too small." );
00206     sprintf( FLA_Error_string_for_code(FLA_INVALID_OBJECT_LENGTH),
00207              "Expected different object length." );
00208     sprintf( FLA_Error_string_for_code(FLA_INVALID_OBJECT_WIDTH),
00209              "Expected different object width." );
00210     sprintf( FLA_Error_string_for_code(FLA_INVALID_ERROR_CHECKING_LEVEL),
00211              "Invalid error checking level." );
00212     sprintf( FLA_Error_string_for_code(FLA_ATTEMPTED_OVER_REPART_2X2),
00213              "Detected attempt to (2x2) repartition more matrix into A11 than exists in source quadrant." );
00214     sprintf( FLA_Error_string_for_code(FLA_ATTEMPTED_OVER_REPART_2X1),
00215              "Detected attempt to (2x1) repartition more matrix into A1 than exists in source partition." );
00216     sprintf( FLA_Error_string_for_code(FLA_ATTEMPTED_OVER_REPART_1X2),
00217              "Detected attempt to (1x2) repartition more matrix into A1 than exists in source partition." );
00218 }

char* FLA_Error_string_for_code ( int  code  ) 

References fla_error_string.

Referenced by FLA_Check_error_code_helper(), and FLA_Error_messages_init().

00046 {
00047     return fla_error_string[-code];
00048 }

void FLA_Print_message ( char *  str,
char *  file,
int  line 
)

Referenced by FLA_Check_error_code_helper(), FLASH_Apply_Q_UT_inc_create_workspace(), FLASH_FS_incpiv(), FLASH_LU_incpiv(), FLASH_LU_incpiv_create_hier_matrices(), and FLASH_QR_UT_inc_create_hier_matrices().

00227 {
00228     fprintf( stderr, "\n" );
00229     fprintf( stderr, "libflame: %s (line %d):\n", file, line );
00230     fprintf( stderr, "libflame: %s\n", str );
00231     fflush( stderr );
00232 }


Variable Documentation

char fla_error_string[FLA_MAX_NUM_ERROR_MSGS][FLA_MAX_ERROR_MSG_LENGTH]


Generated on Mon Jul 6 05:45:52 2009 for libflame by  doxygen 1.5.9