- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am new to the MKL. My platform is Win7 (64bit), Visual Studio 2010, and I am using the MSVC compiler / linker, not Intel. I am building a 32 bit project. I have version 11.1 of the Intel Compiler and whatever the associated MKL is. I just made my first project in MSVC using MKL functions, and I'm getting fatal memory errors.
Running this project causes a fatal error. I've tried it in the National Instruments C IDE as well, and it causes "dynamic memory corruption" and general protection faults. What's going on?? I configured MSVC 2010 to use MKL by the following steps: including the 32 bit static libraries: mkl_core.lib, mkl_intel_c.lib, mkl_intel_thread.lib, and libiomp5md.lib. In addition, I placed libiomp5md.dll in my executable directory and added the MKL ia32 include directory to my include paths.
#include "mkl.h"
#include <stdio.h>
#include <string.h>
#include <math.h>#define ARRAYSIZE 8096static double* fftArray = NULL;
static double* zeros = NULL;
static MKL_LONG status;
static DFTI_DESCRIPTOR_HANDLE descriptorHandle;void initializeFFT()
{
int i;for (i = 0; i < ARRAYSIZE; i++)
fftArray = sin((double)i/3) + sin((double)i/30) + sin((double)i/100);memset(zeros, 0, ARRAYSIZE * sizeof(double));
}int main()
{
fftArray = (double*)mkl_malloc(ARRAYSIZE * sizeof(double), 16);
zeros = (double*)mkl_malloc(ARRAYSIZE * sizeof(double), 16);
intializeFFT();
DftiCreateDescriptor(&descriptorHandle, DFTI_DOUBLE, DFTI_COMPLEX, 1, ARRAYSIZE);
DftiCommitDescriptor(descriptorHandle);
status = DftiComputeForward(descriptorHandle, fftArray, zeros);
DftiFreeDescriptor(&descriptorHandle);mkl_free_buffers();
}
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page