libflame  revision_anchor
Functions | Variables
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)
 

Variables

char fla_error_string [FLA_MAX_NUM_ERROR_MSGS][FLA_MAX_ERROR_MSG_LENGTH]
 

Function Documentation

◆ FLA_Abort()

void FLA_Abort ( void  )

◆ FLA_Error_messages_init()

void FLA_Error_messages_init ( void  )

References FLA_Error_string_for_code().

35 {
36  sprintf( FLA_Error_string_for_code(FLA_INVALID_SIDE),
37  "Invalid side parameter value." );
38  sprintf( FLA_Error_string_for_code(FLA_INVALID_UPLO),
39  "Invalid uplo parameter value." );
40  sprintf( FLA_Error_string_for_code(FLA_INVALID_TRANS),
41  "Invalid trans parameter value." );
42  sprintf( FLA_Error_string_for_code(FLA_INVALID_TRANS_GIVEN_DATATYPE),
43  "Invalid trans value (FLA_CONJ_TRANSPOSE|FLA_CONJ_NO_TRANSPOSE) for given non-complex object datatype" );
44  sprintf( FLA_Error_string_for_code(FLA_INVALID_CONJ),
45  "Invalid conjugate parameter value." );
46  sprintf( FLA_Error_string_for_code(FLA_INVALID_DIRECT),
47  "Invalid direction parameter value." );
48  sprintf( FLA_Error_string_for_code(FLA_INVALID_STOREV),
49  "Invalid storev parameter value." );
50  sprintf( FLA_Error_string_for_code(FLA_INVALID_DATATYPE),
51  "Invalid datatype value." );
52  sprintf( FLA_Error_string_for_code(FLA_INVALID_INTEGER_DATATYPE),
53  "Invalid integer datatype value." );
54  sprintf( FLA_Error_string_for_code(FLA_INVALID_REAL_DATATYPE),
55  "Invalid real datatype value." );
56  sprintf( FLA_Error_string_for_code(FLA_INVALID_COMPLEX_DATATYPE),
57  "Invalid complex datatype value." );
58  sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_INTEGER),
59  "Expected integer object." );
60  sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_REAL),
61  "Expected real object." );
62  sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_COMPLEX),
63  "Expected complex object." );
64  sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_SQUARE),
65  "Expected square matrix object." );
66  sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_SCALAR),
67  "Expected scalar object." );
68  sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_VECTOR),
69  "Expected vector object." );
70  sprintf( FLA_Error_string_for_code(FLA_INCONSISTENT_DATATYPES),
71  "Detected inconsistent object datatypes." );
72  sprintf( FLA_Error_string_for_code(FLA_NONCONFORMAL_DIMENSIONS),
73  "Detected inconsistent object dimensions." );
74  sprintf( FLA_Error_string_for_code(FLA_UNEQUAL_VECTOR_DIMS),
75  "Detected vectors of unequal dimensions." );
76  sprintf( FLA_Error_string_for_code(FLA_NULL_POINTER),
77  "Encountered NULL pointer." );
78  sprintf( FLA_Error_string_for_code(FLA_SPECIFIED_OBJ_DIM_MISMATCH),
79  "Specified dimensions do not match object dimensions." );
80  sprintf( FLA_Error_string_for_code(FLA_INVALID_PIVOT_TYPE),
81  "Invalid pivot index type specified." );
82  sprintf( FLA_Error_string_for_code(FLA_MALLOC_RETURNED_NULL_POINTER),
83  "malloc() returned NULL pointer." );
84  sprintf( FLA_Error_string_for_code(FLA_OBJECT_BASE_BUFFER_MISMATCH),
85  "Detected a buffer address mismatch between adjacent objects." );
86  sprintf( FLA_Error_string_for_code(FLA_OBJECTS_NOT_VERTICALLY_ADJ),
87  "Object partitions not vertically adjacent." );
88  sprintf( FLA_Error_string_for_code(FLA_OBJECTS_NOT_HORIZONTALLY_ADJ),
89  "Object partitions not horizontally adjacent." );
90  sprintf( FLA_Error_string_for_code(FLA_ADJACENT_OBJECT_DIM_MISMATCH),
91  "Object partitions have mismatched dimensions." );
92  sprintf( FLA_Error_string_for_code(FLA_OBJECTS_NOT_VERTICALLY_ALIGNED),
93  "Object partitions not vertically aligned." );
94  sprintf( FLA_Error_string_for_code(FLA_OBJECTS_NOT_HORIZONTALLY_ALIGNED),
95  "Object partitions not horizontally aligned." );
96  sprintf( FLA_Error_string_for_code(FLA_INVALID_FLOATING_DATATYPE),
97  "Expected single or double-precision real or complex datatype value." );
98  sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_FLOATING_POINT),
99  "Expected single or double-precision real or complex object." );
100  sprintf( FLA_Error_string_for_code(FLA_INVALID_BLOCKSIZE_VALUE),
101  "Detected blocksize value less than or equal to zero." );
102  sprintf( FLA_Error_string_for_code(FLA_OPEN_RETURNED_ERROR),
103  "open() returned bad file descriptor." );
104  sprintf( FLA_Error_string_for_code(FLA_LSEEK_RETURNED_ERROR),
105  "lseek() returned error." );
106  sprintf( FLA_Error_string_for_code(FLA_CLOSE_RETURNED_ERROR),
107  "close() returned error." );
108  sprintf( FLA_Error_string_for_code(FLA_UNLINK_RETURNED_ERROR),
109  "unlink() returned error." );
110  sprintf( FLA_Error_string_for_code(FLA_READ_RETURNED_ERROR),
111  "read() returned error." );
112  sprintf( FLA_Error_string_for_code(FLA_WRITE_RETURNED_ERROR),
113  "write() returned error." );
114  sprintf( FLA_Error_string_for_code(FLA_INVALID_QUADRANT),
115  "Invalid quadrant parameter value." );
116  sprintf( FLA_Error_string_for_code(FLA_NOT_YET_IMPLEMENTED),
117  "Function or conditional branch/case not yet implemented." );
118  sprintf( FLA_Error_string_for_code(FLA_EXPECTED_NONNEGATIVE_VALUE),
119  "Expected non-negative value." );
120  sprintf( FLA_Error_string_for_code(FLA_SUPERMATRIX_NOT_ENABLED),
121  "SuperMatrix support must be enabled for this code to execute." );
122  sprintf( FLA_Error_string_for_code(FLA_UNDEFINED_ERROR_CODE),
123  "Undefined error code passed to FLA_Check_error_code()." );
124  sprintf( FLA_Error_string_for_code(FLA_INVALID_DIAG),
125  "Invalid diag parameter value." );
126  sprintf( FLA_Error_string_for_code(FLA_INCONSISTENT_OBJECT_PRECISION),
127  "Inconsistent precisions between objects." );
128  sprintf( FLA_Error_string_for_code(FLA_INVALID_BLOCKSIZE_OBJ),
129  "Encountered blocksize object containing value less than or equal to zero." );
130  sprintf( FLA_Error_string_for_code(FLA_VECTOR_DIM_BELOW_MIN),
131  "Detected vector dimension below pre-determined minimum." );
132  sprintf( FLA_Error_string_for_code(FLA_PTHREAD_CREATE_RETURNED_ERROR),
133  "pthread_create() returned error." );
134  sprintf( FLA_Error_string_for_code(FLA_PTHREAD_JOIN_RETURNED_ERROR),
135  "pthread_join() returned error." );
136  sprintf( FLA_Error_string_for_code(FLA_INVALID_ISGN_VALUE),
137  "Invalid value for isgn parameter (ie: |isgn| != 1)." );
138  sprintf( FLA_Error_string_for_code(FLA_CHOL_FAILED_MATRIX_NOT_SPD),
139  "FLA_Chol() failed due to negative diagonal element; matrix not SPD." );
140  sprintf( FLA_Error_string_for_code(FLA_INVALID_ELEMTYPE),
141  "Invalid object element type value." );
142  sprintf( FLA_Error_string_for_code(FLA_POSIX_MEMALIGN_FAILED),
143  "posix_memalign() returned error." );
144  sprintf( FLA_Error_string_for_code(FLA_INVALID_SUBMATRIX_DIMS),
145  "Invalid submatrix dimensions relative to parent matrix." );
146  sprintf( FLA_Error_string_for_code(FLA_INVALID_SUBMATRIX_OFFSET),
147  "Invalid submatrix offset relative to dimensions of submatrix and parent." );
148  sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_SCALAR_ELEMTYPE),
149  "Object element type is not FLA_SCALAR as expected." );
150  sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_MATRIX_ELEMTYPE),
151  "Object element type is not FLA_MATRIX as expected." );
152  sprintf( FLA_Error_string_for_code(FLA_ENCOUNTERED_NON_POSITIVE_NTHREADS),
153  "Encountered non-positive (zero) value for number of threads." );
154  sprintf( FLA_Error_string_for_code(FLA_INVALID_CONJ_GIVEN_DATATYPE),
155  "Invalid conj value (FLA_CONJUGATE) for given non-complex object datatype" );
156  sprintf( FLA_Error_string_for_code(FLA_INVALID_COMPLEX_TRANS),
157  "Invalid complex trans parameter value" );
158  sprintf( FLA_Error_string_for_code(FLA_INVALID_REAL_TRANS),
159  "Invalid real trans parameter value" );
160  sprintf( FLA_Error_string_for_code(FLA_INVALID_BLAS_TRANS),
161  "Invalid BLAS-style trans parameter value" );
162  sprintf( FLA_Error_string_for_code(FLA_INVALID_NONCONSTANT_DATATYPE),
163  "Invalid non-constant datatype value." );
164  sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_NONCONSTANT),
165  "Expected non-constant object." );
166  sprintf( FLA_Error_string_for_code(FLA_OBJECT_DATATYPES_NOT_EQUAL),
167  "Detected unequal object datatypes." );
168  sprintf( FLA_Error_string_for_code(FLA_DIVIDE_BY_ZERO),
169  "Encountered request to invert zero scalar object." );
170  sprintf( FLA_Error_string_for_code(FLA_OBJECT_ELEMTYPES_NOT_EQUAL),
171  "Detected unequal object elemtypes." );
172  sprintf( FLA_Error_string_for_code(FLA_INVALID_PIVOT_INDEX_RANGE),
173  "Invalid pivot index range." );
174  sprintf( FLA_Error_string_for_code(FLA_HOUSEH_PANEL_MATRIX_TOO_SMALL),
175  "Block-panel Householder matrix is too small." );
176  sprintf( FLA_Error_string_for_code(FLA_INVALID_OBJECT_LENGTH),
177  "Expected different object length." );
178  sprintf( FLA_Error_string_for_code(FLA_INVALID_OBJECT_WIDTH),
179  "Expected different object width." );
180  sprintf( FLA_Error_string_for_code(FLA_INVALID_ERROR_CHECKING_LEVEL),
181  "Invalid error checking level." );
182  sprintf( FLA_Error_string_for_code(FLA_ATTEMPTED_OVER_REPART_2X2),
183  "Detected attempt to (2x2) repartition more matrix into A11 than exists in source quadrant." );
184  sprintf( FLA_Error_string_for_code(FLA_ATTEMPTED_OVER_REPART_2X1),
185  "Detected attempt to (2x1) repartition more matrix into A1 than exists in source partition." );
186  sprintf( FLA_Error_string_for_code(FLA_ATTEMPTED_OVER_REPART_1X2),
187  "Detected attempt to (1x2) repartition more matrix into A1 than exists in source partition." );
188  sprintf( FLA_Error_string_for_code(FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED),
189  "External LAPACK wrapper was invoked despite not being enabled at configure-time." );
190  sprintf( FLA_Error_string_for_code(FLA_INVALID_ROW_STRIDE),
191  "Invalid matrix row stride." );
192  sprintf( FLA_Error_string_for_code(FLA_INVALID_COL_STRIDE),
193  "Invalid matrix column stride." );
194  sprintf( FLA_Error_string_for_code(FLA_INVALID_STRIDE_COMBINATION),
195  "Invalid combination of matrix row and column strides." );
196  sprintf( FLA_Error_string_for_code(FLA_INVALID_VECTOR_DIM),
197  "Detected vector of unexpected length/width." );
198  sprintf( FLA_Error_string_for_code(FLA_EXPECTED_ROW_VECTOR),
199  "Expected object to be a row vector." );
200  sprintf( FLA_Error_string_for_code(FLA_EXPECTED_COL_VECTOR),
201  "Expected object to be a column vector." );
202  sprintf( FLA_Error_string_for_code(FLA_INVALID_INVERSE),
203  "Invalid inverse parameter value." );
204  sprintf( FLA_Error_string_for_code(FLA_MALLOC_GPU_RETURNED_NULL_POINTER),
205  "Attempt to allocate memory on GPU failed." );
206  sprintf( FLA_Error_string_for_code(FLA_INVALID_EVD_TYPE),
207  "Invalid eigenvalue/vector type parameter value." );
208  sprintf( FLA_Error_string_for_code(FLA_INVALID_SVD_TYPE),
209  "Invalid singular vector type parameter value." );
210  sprintf( FLA_Error_string_for_code(FLA_INVALID_MACHVAL),
211  "Invalid machine parameter value." );
212  sprintf( FLA_Error_string_for_code(FLA_INVALID_DIAG_OFFSET),
213  "Invalid diagonal offset." );
214  sprintf( FLA_Error_string_for_code(FLA_EXPECTED_COL_STORAGE),
215  "Expected object to be stored by columns." );
216  sprintf( FLA_Error_string_for_code(FLA_EXPECTED_ROW_STORAGE),
217  "Expected object to be stored by rows." );
218  sprintf( FLA_Error_string_for_code(FLA_LAPAC2FLAME_INVALID_RETURN),
219  "Invalid return value from lapack2flame interface." );
220  sprintf( FLA_Error_string_for_code(FLA_INVALID_SVD_TYPE_COMBINATION),
221  "Invalid svd type parameter combination (both parameters are FLA_SVD_VECTORS_OVERWRITE)." );
222  sprintf( FLA_Error_string_for_code(FLA_INVALID_SVD_TYPE_AND_TRANS_COMBINATION),
223  "Invalid svd type parameters (FLA_SVD_VECTORS_OVERWRITE) and trans parameters combination." );
224  sprintf( FLA_Error_string_for_code(FLA_OBJECT_NOT_COMPARABLE),
225  "Expected real or int object." );
226 }
char * FLA_Error_string_for_code(int code)
Definition: FLA_Error.c:23

◆ FLA_Error_string_for_code()

char* FLA_Error_string_for_code ( int  code)

References fla_error_string.

Referenced by FLA_Check_error_code_helper(), and FLA_Error_messages_init().

24 {
25  return fla_error_string[-code];
26 }
char fla_error_string[FLA_MAX_NUM_ERROR_MSGS][FLA_MAX_ERROR_MSG_LENGTH]
Definition: FLA_Error.c:14

◆ FLA_Print_message()

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

Variable Documentation

◆ fla_error_string

char fla_error_string[FLA_MAX_NUM_ERROR_MSGS][FLA_MAX_ERROR_MSG_LENGTH]