Driver and computational routines, and a few BLAS/auxiliary routines, currently return errors both as a return value and in the info argument.
The return value and info should always be identical. In general, the meaning is as given in this table. Predefined error codes are large negative numbers.
Info | Description ----------- | ----------- info = 0 (MAGMA_SUCCESS) | Successful exit info < 0, but small | For info = -i, the i-th argument had an illegal value info > 0 | Function-specific error such as singular matrix MAGMA_ERR_DEVICE_ALLOC | Could not allocate GPU device memory MAGMA_ERR_HOST_ALLOC | Could not allocate CPU host memory MAGMA_ERR_ILLEGAL_VALUE | An argument had an illegal value (deprecated; instead it should return -i to say the i-th argument was bad) MAGMA_ERR_INVALID_PTR | Can't free pointer MAGMA_ERR_NOT_IMPLEMENTED | Function or option not implemented MAGMA_ERR_NOT_SUPPORTED | Function or option not supported on the current architecture
magma_xerbla is called to report errors (mostly bad arguments) to user.
magma_strerror returns string description of an error code.