Community
cancel
Showing results for 
Search instead for 
Did you mean: 
421 Views

Impossible to use MKL in Visual Studio 2017

Hello, I know that this topic has been widely addressed but in my case I have tried with all the proposed solutions that I have found and no one worked for me. The testing code is the following:

// ConsoleApplication6.cpp : Defines the entry point for the console application.
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include "mkl.h"
#define min(x,y) (((x) < (y)) ? (x) : (y))

int main()
{
	double *A, *B, *C;
	int m, n, k, i, j;
	double alpha, beta;

	m = 2000, k = 200, n = 1000;
	alpha = 1.0; beta = 0.0;
		
	A = new double[m*k];
	B = new double[k*n];
	C = new double[m*n];

	for (i = 0; i < (m*k); i++)
		A = (double)(i + 1);

	for (i = 0; i < (k*n); i++)
		B = (double)(-i - 1);

	for (i = 0; i < (m*n); i++)
		C = 0.0;

	cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans,
		m, n, k, alpha, A, k, B, n, beta, C, n);

	delete[] A, B, C;

	return 0;
}

I get the next error:

Severity Code Description Project File Line Suppression State
Error (active) E1696 cannot open source file "mkl.h"
StateError C1083 Cannot open include file: 'mkl.h': No such file or directory
 

The program versions are:

  • Visual Studio Community 2017 15.6.0
  • Microsoft .NET Framework 4.7.03056
  • Intel MKL 2018.3.210
  • Intel C++ Compiler 18.0

The Intel Performance Library option inside Configuration Properties is set to Sequential but it didn't link correctly.

I don't know if it could be a compatibility issue between the latest releases of those programs... I will appreciate your responds

Thanks in advance.

 

0 Kudos
1 Reply
Gennady_F_Intel
Moderator
421 Views

yes, no all issue with VS2017 integration are still resolved for now, but you always may compile and link your mkl based application manaully.Please look at the existing KB Article follow this link - https://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-compiling-and-linking-...

and  try to follow with the tips: Use Intel® MKL in Microsoft* Visual Studio 2017/2015/2012/2010 - Manually

Reply