For what reasons can mkl_free() fail?

For what reasons can mkl_free() fail?

I am working with Intel's MKL in C++ and I get a lot of runtime errors with themkl_free(some_matrix); call. Usually, it just hangs when it reaches the matrix. What are the reasons that can cause it to fail?

5 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

>>...the mkl_free( some_matrix )

It is not enough and more technical details are needed.

>>...What are the reasons that can cause it to fail?

Please provide an example of how you use MKL functions.

Thanks for your reply Sergey. I am using MS Visual Studio 2008 to build with MKL 11.0.5. When I run the application in Release mode, the program simply hangs so I was looking for ideas on how to debug the issue. A sample of the mkl_free() call can be found here on line 1464:

Could you please prepare the standalone example shows the problem? the example you provided cannot be compiled. 

Could you comment everything between these two blocks in order to very that simple allocation-deallocation works without any problems?

void Registration::multiObjectAtlasShapeCoefFunction( ... )
{
...
// Initialize some variables
double* Tr = (double*)mkl_malloc(4 * 4 * sizeof(double), 64);
double* Tr2 = (double*)mkl_malloc(4 * 4 * sizeof(double), 64);
...
/*
Comment all codes between allocations and deallocations
*/
...
cout << "Before free" << endl;
// Free all local variables
mkl_free_buffers();
cout << "a" << endl;
mkl_free(Tr); // fails to free
cout << "b" << endl;
mkl_free(Tr2);
// cout << "c" << endl;
// mkl_free(pose_feature_transform);
// cout << "d" << endl;
// mkl_free(pose_feature_transform2);
// cout << "e" << endl;
// mkl_free(ones);
// cout << "f" << endl;
// mkl_free(part1);
// cout << "g" << endl;
// mkl_free(part2);
// cout << "h" << endl;
// mkl_free(part1_2);
// cout << "done." << endl;
}

Then, start uncommenting line-by-line with verifications of binaries ( in Debug and Release configurations ) until you reproduce the problem. If you manage to reproduce it follow these simple steps a last uncommented piece of codes is where the problem is.

Accedere per lasciare un commento.