Out of space in MKL

Out of space in MKL

What happens if MKL cannot allocate space for internal buffers.Does it crash?Does it use a simple version that does not require any buffers?Is there anyto know if MKL ran out of buffer space?Is this documented anywhere?Erling

9 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Hi,

In case of memory allocation problems for internal buffers, MKL reports this
- via XERBLA function call (for some components like BLAS, LAPACK, etc.)
- or by returning corresponding error if return code is supported for a MKL function

Thanks, -- Victor

Does that mean if it runs out of space the result is invalid. Or does it compute the result by a simpler method requiring no extra space?[I have been on vacation and therefore could not reply before.]

Quoting erling_andersenDoes that mean if it runs out of space the result is invalid.
Or does it compute the result by a simpler method requiring no extra space?

If MKL functioncalls XERBLA or retuns error code on user levelthen calculations are aborted and function result is invalid. However, in some cases MKL functions can or coulduse different implementations depending on available resources.

Thanks, -- Victor

XERBLA is described athttp://software.intel.com/sites/products/documentation/hpc/mkl/mklman/GUID-F3536B0B-2FA0-40B4-AF9B-51A182827F73.htm
and it only talks abour arguments being invalid. So that is not very relevant for this discussion.What do you mean by returning an error code. To my knowledge for instance dgemm cannot return an error code.Let me be more precise. Assuming all the arguments to dgemm are correct. Is there then any way it can fails?[For instance due to lack of buffer space.]

Hi,You are right, implementation of XERBLA in MKL differ from Netlib implementation and user can get additional messages(not only invalid arguments warning).For xerbla( srname, info, len )Additional values for info parameter are1000 "MKL INTERNAL ERROR: Not enough work memory in function %s."1001 "MKL ERROR: Incompatible optional parameters on entry to %s."In documentation we don't have this information yet.

Let me be more precise. Assuming all the arguments to dgemm are correct. Is there then any way it can fails?[For instance due to lack of buffer space.]

You got or error message orit compute the result by a simpler method. You were right

So if you call say dgemm from multiple threads threads you will not know in which thread it failed? Right?
If the answer is yes, then you have to conclude all dgemms failed in order to be safe.
[I know you did not design BLAS, but it make it very hard to build rock solid applications.]

Wouldn't MKL call the error function from the thread that failed, and you could check which thread it was by calling GetCurrentThreadID()?

Standard XERBLA will not provide such info.
However, you can redefine it with your own XERBLA and see thread-id

Thanks, -- Victor

Faça login para deixar um comentário.