Showing results for

- Intel Community
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
- MKL summary statistics error

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted
##

Chen__Jun

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-18-2016
04:46 AM

22 Views

MKL summary statistics error

I try to compute the mean of an array by the summary statistics function, I am following the link

https://software.intel.com/en-us/articles/overview-of-summary-statistics-ss-in-intel-mkl-v103

However. after I compile it and run it, then it will have Segmentation fault (core dumped) error.

Here is my code:

int N = 4;

VSLSSTaskPtr task; /* SS task descriptor */

double x

double mean; /* Array for mean estimate */

double* w = 0; /* Null pointer to array of weights, default weight equal to one will be used in the computation */

MKL_INT p, n, xstorage;

int status;

x[0] = 0.1;

x[1] = 0.2;

x[2] = 0.3;

x[3] = 0.4;

/* Initialize variables used in the computation of mean */

p = 1;

n = N;

xstorage = VSL_SS_MATRIX_STORAGE_ROWS;

mean = 0.0;

/* Step 1 - Create task */

status = vsldSSNewTask( &task, &p, &n, &xstorage, x, w, 0 );

/* Step 2- Initialize task parameters */

status = vsldSSEditTask( task, VSL_SS_ED_MEAN, &mean );

/* Step 3 - Compute the mean estimate using SS one-pass method */

status = vsldSSCompute(task, VSL_SS_MEAN, VSL_SS_METHOD_1PASS );

/* Step 4 - deallocate task resources */

status = vslSSDeleteTask( &task );

Almost the same as the example in the link. I don't know what is the problem, is it because i misunderstand the function?

3 Replies

Highlighted
##

Chen__Jun

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-18-2016
03:36 PM

22 Views

When I use the example to check the error information, then I have

VSL_SS_ERROR_STORAGE_NOT_SUPPORTED.

I changed the format based on the reference, actually, there are only two kinds of storage format and neither of them does work. Could any one help me solve it? thanks before hand.

Highlighted
##

Andrey_N_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-19-2016
07:32 AM

22 Views

Hi Jun,

Can you please clarify the version of Intel MKL and cpu you use in your experiments? Also, additional details on type of linkage and the version, 32- or 64 bit of the library would be helpful.

Thanks,

Andrey

Highlighted
##

Chen__Jun

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-19-2016
02:31 PM

22 Views

Andrey N. (Intel) wrote:

Hi Jun,

Can you please clarify the version of Intel MKL and cpu you use in your experiments? Also, additional details on type of linkage and the version, 32- or 64 bit of the library would be helpful.

Thanks,

Andrey

Hi, Andrey,

Thanks for your reply, I figured out the problem that I miss some parts in the makefile of my code. After fixed it, it works.

For more complete information about compiler optimizations, see our Optimization Notice.