Quantcast
Channel: Intel® Software - Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all 3005 articles
Browse latest View live

Intel® MKL 11.3.3 patch

$
0
0

There are two listed below limitations with Intel® Math Kernel Library (Intel® MKL) 11.3 Update 3 which were discovered recently. The official fix of these issues will be available the nearest update Intel MKL 11.3.4.

If you require an immediate Intel MKL update to address these issues, please submit a ticket at Intel Premier Support (https://premier.intel.com) for the Intel MKL product.

Known Limitations: 

  • Intel MKL 11.3 Update 3 SGEMM and DGEMM functions on 64-bit Intel AVX2 and second generation of Intel® Xeon Phi™ Product Family may produce incorrect results when called from nested OpenMP regions. Workarounds include setting the environment variable, export OMP_NESTED=1, or calling the function, omp_set_nested(1),  before calling the SGEMM or DGEMM functions.
  • Intel MKL PARDISO produces incorrect results due to an issue with the nested dissection reordering algorithm (iparm[2]=2). To work around this issue, set iparm[2] = 0 to use the minimum degree algorithm for reordering.

Solving coupled PDEs

$
0
0

I am trying to model a packed bed reactor with a system of three or four partial differential equations and Ordinary Differential Equations(momentum, energy and mass continuity equations). Does any know of any subroutines, either in the MKL library or eslewhere free which can do this for me ? Any solutions for C/C++ as well as for Fortran would be welcomed.

 

Regards

MKL error

$
0
0

Hi

Can anyone help why the following error happens:-

Intel MKL FATAL ERROR: Error on loading function mkl_blas_avx2_get_kernel_api_version.

This is appearing when running a program that uses intel MKL (to state the obivous). I am guessing that a (specif version of) library is missing. When the exe is built, it uses /Qmkl: parallel and specifies the mkl_blas libraries (blas and lapack) to be used.

Abhijit

 

Newbie question on setting environment variables and linking

$
0
0

Hi,

I just downloaded and installed Intel MKL on my Windows 10 machine. I'm trying to follow instructions on this page so that I can get started:

https://software.intel.com/en-us/articles/intel-mkl-113-getting-started"

I presume that, as in manual installation of LAPACK, gfortran, etc, which I had done before, I need to add the path to the MKL library in my environment variables (Control Panel -> System -> Advanced System Settings -> 'Advanced' tab -> Environment Variables -> Add/Edit). Am I correct? What should be the path?

I tried to follow the instructions above, but was confused.

There it says:

"A script (batch file on Windows, shell script on other platforms) located in the <mkl install directory>>\ compilers_and_libraries_2016\windows\mkl\bin\ directory (by default, it is C:\Program Files (x86)\IntelSWTools\ compilers_and_libraries_2016\windows\mkl\bin\)  can be used to set the MKLROOT, LIB, INCLUDE and any required system-specific environment variables to point to the appropriate MKL library directories."

I can locate this easily. But when I try to run things like

mklvars ia32

in that folder through Command Prompt, I really don't get anything. Am I doing the right thing anyway?

The instructions also say

"On a Windows system the following batch files are available to configure the environment for building Intel MKL applications:

mkl\bin\mklvars.bat  <arch>

or

IA-32 Intel® Architecture:  \mkl \bin\ia32\mklvars_ia32.bat
Intel® 64 Architecture:  \mkl \bin\intel64\mklvars_intel64.bat
"

I presume that the MKLROOT directory is C:\Program Files (x86)\IntelSWTools\ compilers_and_libraries_2016\windows\mkl\bin\, but I can't find the folders ia32 and intel64, or the files mklvars_ia32.bat and mklvars_intel64.bat anywhere.

So how should I set the environment variables so that I can compile my source code files through gfortran in Command Prompt? What line should I use to compile and link in Command Prompt?

Thanks.

 

how can I increase the efficiency of MKL on MIC?

$
0
0

I have been used  MKL on MIC Xeon  Coprocessor like this :

	#pragma offload target(mic:1) in(in:length(nx*ny))\
				      out(out:length(nx*ny))
	{
		fftwf_plan temp= fftwf_plan_dft_2d(nx,ny,in, out, FFTW_BACKWARD, FFTW_ESTIMATE);
		fftwf_execute(temp);
	}

  but I find that the code consumes almost the same time comparing with the fftw library on CPU.

I think it is amazing , how can I increase the efficiency of MKL on MIC?

Thanks!

Thread Topic: 

Help Me

RPM File(s) Fail to install

$
0
0

Hi,

While install Math Kernel Library (11.3.3), I receive message as Fail to install package intel-mkl-210-11.3.3-210-i486.rpm, I enclosed the screen shot of the Error through this message, please verify and give the need full solution.

Thanks in advance.RPM File Error Message

Thread Topic: 

Question

pblas header incorrect for PvTRMV

$
0
0

Hi,

In the mkl_pblas.h, the prototypes for p*trmv are of the form, e.g., single precision,

void pstrmv( const char *uplo, const char *trans, const char *diag, const MKL_INT *n, const float *a, const MKL_INT *ia, const MKL_INT *ja, const MKL_INT *desca, float *x, const MKL_INT *ix, const MKL_INT *jx, const MKL_INT *descx, const MKL_INT *incx );

However, the interface according to netlib ( http://www.netlib.org/scalapack/pblas_qref.html ) is

PvTRMV( UPLO, TRANS, DIAG, M, N, A, IA, JA, DESCA, X, IX, JX, DESCX, INCX )

Notice that the MKL is missing the 'const MKL_INT *m' for the fourth argument.

I have MKL 11.3.3 for Windows.

This seems to be a mistake in the MKL header. Can anyone confirm this for me or am I misinterpreting the netlib reference?

Thanks,
John

Cluster_Sparse_Solver Beginner Questions

$
0
0

For the project I am working on I need to solve a very large system of sparse linear equations (3-4 Billion rows) describing flow along a network. Each edge of the network creates 4 matrix values with indexes with the form: (i,i) (i,j)  (j,i) (j,j). Each row of the matrix, corresponds to a particular node of the network and each node can connect to 4 to 5 edges. I need to sum the diagonal elements from all the edges that connect to each node. My objects describing the edges of the network are large and can not be fit on a single node. My question is, does the cluster sparse solver sum up elements that are repeated for me, or do i need to perform that work on my own? As an alternative, does PARDISO perform this type of summation?

Second question, I read somewhere that the entire matrix must be able to fit onto each node. Is this still true?

Finally, I have a performance question. I have the ability to create my matrix such that it is Positive Definite (really simple if just flip the signs of the matrix and rhs side vector). Is solving a positive definite matrix fast, more precise, or both when compared to a sparse indefinite?


Using sgemm with multiple cores

$
0
0

Hello! I am trying to implement sgemm matrix multiplication on multiple physical cores and I am a little confused on how to do so. 

Say I have obtained 9 physical cores from an HPC system and I want sgemm to use all of these cores to do the matrix multiplication. In this case I do not want to use multithreading on these 9 cores, only these 9 cores as a whole. So in a way I guess you could say that the 9 cores are the threads to be used by sgemm. Below is some code I have created, which I believe implements what I want to do. Is this implementation correct?  

program mkl_matrixmul

use mpi

implicit none

integer :: N,max_threads,mkl_get_max_threads

real, allocatable, dimension(:,:) :: A,B,C

integer :: ierror,num_cores,my_rank

double precision :: time1,time2

CALL MPI_Init(ierror)             !Flag for error                                                                                                                                    

CALL MPI_COMM_Size(MPI_COMM_WORLD,num_cores,ierror)   !puts in the number of cores into num_cores                                                                                    

CALL MPI_Comm_rank(MPI_COMM_WORLD,my_rank,ierror)     !defining the variable for the rank of the core                                                                    

CALL MPI_BARRIER(MPI_COMM_WORLD,ierror)

if(my_rank == 0)then

   !starting the timer                                                                                                                                                               

   time1 = MPI_Wtime()

end if    

N = 61740

Allocate(A(N,N),B(N,N),C(N,N))

A = 1.0                                                                                                                                                                             

B = 2.0                                                                                                                                                                             

C = 0.0                                                                                                                                                                             

call mkl_set_num_threads(num_cores)

call sgemm('N','N',N,N,N,1.0,A,N,B,N,1.0,C,N)                                                                                                              

CALL MPI_BARRIER(MPI_COMM_WORLD,ierror)

if(my_rank == 0)then

   !printing the elapsed time                                                                                                                                                        

   time2 = MPI_Wtime()

   print *, 'elapsed time' , time2 - time1

   print *, C(1,2)

end if

CALL MPI_Finalize(ierror)

end program mkl_matrixmul

 

Also if it helps, I am using a Sandy Bridge node with 256 GB of memory. 

Thank you, 

Brandon 

 

 

Thread Topic: 

Question

Error #6285: no matching specific subroutine for heevr

$
0
0

Hi,

I need to calculate eigenvalues for a large matrix. Previously I've been always using GEEV to do the job, but, since this matrix is hermitian and very large, HEEVR should be much quicker. But in compiling, always this error

error #6285: There is no matching specific subroutine for this generic subroutine call.   [HEEVR]

For instance, the following is the simple code I used to test the subroutine. 

program heevexercise
    use f95_precision,only: wp=>dp
    use lapack95,only: heevr
    implicit none
    complex(wp),dimension(:,:),allocatable:: A0
    complex(wp),dimension(:),allocatable:: w0
    integer:: i,j,info

    allocate(A0(2,2),w0(2))
    A0=0._wp
    w0=0._wp
    A0=reshape((/0._wp,1._wp,1._wp,0._wp/),(/2,2/))

    write(*,*) "A:"
    write(*,"(2(1X,F9.2))") ((real(A0(i,j)),j=1,2),i=1,2)

    call heevr(a=A0,w=w0,uplo='U',info=info)
    write(*,*) "Diagonal A:"
    write(*,"(2(1X,F9.2))") ((real(A0(i,j)),j=1,2),i=1,2)
end program

Any reasons for this error? I have been looking around, but I didn't get any clue. 

BTW, the IDE I used is Code:: Blocks, additional compiler options just 

/heap-arrays0
/Qmkl:parallel /c

The library is mkl_lapack95_lp64.lib

Regards,

Geliv

dfsNewTask1D returning error (-1009)

$
0
0

Hello everybody,

I am trying to execute the data fitting example (from the help)

Here is the code:

         /* Create a Data Fitting task */

        DFTaskPtr task;

        MKL_INT N = 8;
        const float xx[] = {38.0f, 39.0f, 40.0f, 41.0f,
                            46.0f, 47.0f, 48.0f, 49.0f};
        
        const float yy[] = {38.0f*38.0f, 39.0f*39.0f, 40.0f*40.0f, 41.0f*41.0f,
                            46.0f*46.0f, 47.0f*47.0f, 48.0f*48.0f, 49.0f*49.0f};

        status = dfsNewTask1D(&task, mN, xx, DF_NON_UNIFORM_PARTITION, 1, yy, DF_NO_HINT);

Can anybody explain why dfsNewTask1D returning -1009? (problem with DF_NO_HINT?)

I just installed evaluation (today), trying to check the performance of the spline method comparing it with the implementation we have today...

Best Regards and Thanks in advance for any help...

Yony Ribalsky

Zone: 

Thread Topic: 

Help Me

Concerning custom dll static linking, dll called from C# side

$
0
0

Good Day!

I ve installed Intel MKL 11.3 and all C/C++ colsole application samples are firing. I also have working mixed (unmanaged/managed ) application where i try to improve performance using Intel MKL. So normally managed application is calling unmanaged functions by Platform Invoke methods. Nothing unusual.

Problems begin with my custom dll calls Intel MKL, libintel64 and 2nd C# example.

I ve setup up environement as described in Getting Started guides, articles, MS VS Studio C/C++ linking tutrorial. I ve ran "mklvars.bat intel64".

  1. If I compile with static linking to mkl_intel_lp64_dll.lib mkl_core_dll.lib mkl_intel_thread_dll.lib libiomp5md.lib linker cant find files. If I leave only libiomp5md.lib – it is found. Same with libintel64 prototype example.
  2. If I compile without static linking to mkl_intel_lp64_dll.lib mkl_core_dll.lib mkl_intel_thread_dll.lib libiomp5md.lib – custom dll is created but problems begin later.
  3. If I create my custom DLL without static linking to intel mkl libs – it compiles, when I call it from C# app – not found exception occurs. Ok I copy then mkl_core_dll.dll mkl_intel_thread_dll.dll libiomp5md.dll to C# assembly directory. App looks starting well but on second call of my custom dll function I receive error: not found entry point. If I rebuild my custom dll without Intel MKL – everything fires with my default functions.
  4. First C# turorial example fires. Second C# tutorial shows it cant find mkl_intel_lp64_dll.lib and example shuts down with dll not found exception.

Seems I have tried all kind of settings, including paths etc, i copied them directly from directory paths, I ve ran mklvars.bat with IA32 and Intel64 variants. I also tried switch on/off enums in Intel MKL settings in project properties. Nothings helps.

So need assistance.

Thanks in advance.

 

Alexey

 

 

 

Thread Topic: 

Help Me

how to call MKL library in Eclipse under Ubuntu

$
0
0

Hi all,

I'm a rookie in C++ and Linux. I installed Intel Parallel Studio Xe today, in order to use mkl functions.

In g++, the head file mkl.h can be found and called successfully. However,  when I used eclipse, it was reported that "Unresolved inclusion : <mkl.h>".

So... how to call mkl in Eclipse?

Thanks in advance for any help!

 

 

Unresolved reference to lapack95 subroutine

$
0
0

I am sure I am making a very simple and obvious mistake in using lapack95, but I cannot figure it out at present.

Compiling and linking with MKL of the following sample code:

      program test_lapack
            use lapack95,only:ggev
            implicit none
            integer,parameter::x_=8
            integer,parameter::n =2
            complex(kind=x_)::a    (0:n-1,0:n-1)=reshape((/11._x_,12._x_,21._x_,22._x_/),(/2,2/))
            complex(kind=x_)::b    (0:n-1,0:n-1)=reshape((/ 1._x_, 0._x_, 0._x_, 1._x_/),(/2,2/))
            complex(kind=x_)::alpha(0:n-1)
            complex(kind=x_):: beta(0:n-1)
            call ggev(a,b,alpha,beta)
  end program test_lapack

with:

ifort -mkl=sequential test_lapack.F90

yields:

/tmp/ifortzuGiE1.o: In function `MAIN__':
test_lapack.F90:(.text+0x185): undefined reference to `zggev_f95_'

which means the program does find lapack95's ggev interface, but the zggev_F95 is still unresolved. I have checked that both the lapack95.F90 and all lapack95 routine implementations are in place, at /opt/intel/compilers_and_libraries_2016.3.210/linux/mkl/include and /opt/intel/compilers_and_libraries_2016.3.210/linux/mkl/interfaces/lapack95/source respectively. So it appears I am just missing on how to link the lapack95 implementation with its interface, or whatnot.

inner system solver SPARSE FEAST

$
0
0

Dear MKL developers,

I am trying to use FEAST eigenvalue solver with CSR formatted matrix, but encountered unexpected error (info = -2).

Both the Table 10 in the FEAST manual (http://arxiv.org/pdf/1203.4031v3.pdf) and MKL manual (https://software.intel.com/en-us/node/521739#GUID-E1DB444D-B362-4DBF-A1D...) said that this happend because "Internal error of the inner system solver. Possible reasons: not enough memory for inner linear system solver or inconsistent input.".

Could you please provide me comments or advices to fix this problem? The icc version is 15.0.3 and MKL version is 11.2, 64-bit system. I attached the sample code with three different CSR matrices. You can choose the matrix (small, medium, large) by commenting in/out the parts at lines 26-46.

Each CSR file contains Hermitian matrix,
1. 'n': dimension of the matrix
2. 'ia': rows, n+1 elements
3. 'n_val': # of non-zero elements
4. 'ja': columns, n_val elements
5. 'val': values, n_val elements

When I choose 'Small' matrix, I could get proper eigenvalues. But, when I choose 'Medium' matrix, it gives info = -2 and unrealistic 'm' (# of eigenvalues obtained). And for the 'Large' matrix, I got a segmentation fault.

When I ran the code with much simpler sample matrices, it worked fine even with very large matrices.

Thank you in advance,

Pilkyung

AttachmentSize
Downloadapplication/x-tarFEAST.tar1.23 MB

Thread Topic: 

Bug Report

Pardiso in Fortran MKL giving incorrect answers

$
0
0

Hello,

I am trying to understand how the Intel MKL works and so i created a small test code that I have cobbled together from the internet to teach myself how the libraries behave so that I can implement the capability in other projects. My code compiles, runs and reports to zero errors but returns the wrong answer for my system. I have to be doing something wrong but I have no idea what that thing is. My test code is below. 

PROGRAM PardisoTest

use MKL_PARDISO

IMPLICIT NONE

   TYPE(MKL_PARDISO_HANDLE), ALLOCATABLE, DIMENSION(:) :: PT
   INTEGER, ALLOCATABLE, DIMENSION(:) :: idum
   INTEGER, ALLOCATABLE, DIMENSION(:) :: ivect
   INTEGER, ALLOCATABLE, DIMENSION(:) :: jvect
   REAL, ALLOCATABLE, DIMENSION(:) :: b
   REAL, ALLOCATABLE, DIMENSION(:) :: a
   REAL, ALLOCATABLE, DIMENSION(:) :: x
   REAL, ALLOCATABLE, DIMENSION(:) :: solution
   REAL, ALLOCATABLE, DIMENSION(:) :: error
   REAL, ALLOCATABLE, DIMENSION(:) :: ddum
   INTEGER :: maxfct, mnum, mtype, phase, nrhs, ierr, msglvl, i, nnz, nequations
   INTEGER, DIMENSION(64) :: iparm

   nrhs =1
   maxfct = 1
   mnum = 1

   nnz = 9
   nequations = 3

   do i = 1, 64
      iparm(i) = 0
   end do
!
   iparm(1) = 0 ! solver default
   error = 0 ! initialize error flag
   msglvl = 1 ! print statistical information
   mtype = 11 ! real unsymmetric --> as an example

   ALLOCATE(PT(64))
   ALLOCATE(idum(0))
   ALLOCATE(ddum(0))
   ALLOCATE(b(nEquations))
   ALLOCATE(x(nEquations))
   ALLOCATE(a(nnz))
   ALLOCATE(ivect(nequations+1))
   ALLOCATE(jvect(nnz))
   ALLOCATE(error(nEquations))

   do i = 1, 64
      PT(i)%DUMMY = 0
   end do

   a=(/1,2,3,4,5,6,7,8,9/)
   b=(/14,32,50/)
   solution = (/1.0, 2.0, 3.0/)
   jvect = (/1,2,3,1,2,3,1,2,3/)
   ivect = (/1,4,7,10/)

   phase = 11
   CALL pardiso (PT, maxfct, mnum, mtype, phase, nequations, a, ivect, jvect, idum, nrhs, iparm, msglvl, ddum, ddum, ierr)
!
   phase = 22
   CALL pardiso (PT, maxfct, mnum, mtype, phase, nequations, a, ivect, jvect, idum, nrhs, iparm, msglvl, ddum, ddum, ierr)
!
   phase = 33
   CALL pardiso (PT, maxfct, mnum, mtype, phase, nequations, a, ivect, jvect, idum, nrhs, iparm, msglvl, b, x, ierr)

   error = solution - x

END PROGRAM PardisoTest

Any help that someone could provide would be greatly appreciated.

Matt

Zone: 

Thread Topic: 

Question

Fast Poisson solver with inner boundary conditions

$
0
0

Dear all,

I would like to calculate the potential due to a point charge in the proximities of a conducting cylinder. For this I started by calculating the potential due to the point charge alone using the Poisson solver implementation inside Intel MKL ( s_Helmholtz_3D subroutine, based on one of the examples of the MKL, see attached file).

Now the problem is how to impose the boundary conditions (Dirichlet) due to the presence of the cylinder (V=0 in its surface if it is grounded). The system looks like the attached figure. Is there a way to impose the inner boundary conditions using the MKL Fast Poisson solver implementation?. If that is not possible, what approach would you recommend to tackle this problem?

I have tried this problem with an iterative multi-grid solver, but it is painfully slow, therefore I am searching more efficient ways to solve this problem. I really appreciate your help!.

PARDISO Complex

$
0
0

Hi

I am currently working with PARDISO to solve an iterative process that uses complex numbers; the iterative process requires that the sparse matrix be factorized only once (i.e. phase 12). My concern is about the parameters that can make the routine as efficient and fast as possible. The sparse matrix is symmetric but I receive the zero-based CSC vectors for the full matrix, so I’m using mtype 13; I’m not really sure whether it would benefit me to convert the matrix to an upper triangular representation, considering that I would have to analyze the full CSC format and get the new vectors.

The parameters I’m using are (the rest are all zeros):

iparm[0] := 1;
iparm[1] := 3;
iparm[9] := 8;
iparm[10] := 1;
iparm[11] := 2;
iparm[34] := 1;

I set iparm[11] := 2 because I get the CSC format and although the matrix should be symmetric, I just wanted to be sure everything is in its right place.The number of equations will vary between 20000 and 150000, which I’m aware is not a lot for a parallel sparse solver.

There is another thing that I have noticed and I’m not so sure about; when I run the PARDISO routine with 4 threads (my processor has 4 cores), I can see that the first CPU is working at full capacity and the others only show spikes (total processor load is about 21% most of the time), as if the first CPU is doing most of the work and the rest only help every now and then. Is this a normal behavior? To make everything clear, I’m using a custom made DLL that I compiled using the visual studio projects that are included with the MKL. Any help in this matter will be much appreciated.

Regards

Compilation Errors with MKL_DIRECT_CALL_SEQ

$
0
0

Hi,

I'm compiling a cpp file that includes mkl.h and contains a single cblas_dgemm call with the following:

icpc -DMKL_DIRECT_CALL_SEQ -DMKL_ILP64 -I/opt/intel/mkl/include -c -o main.o main.cpp

Compilation breaks and I get mutliple times the following message:

error: expression must be an lvalue or a function designator
    cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 4, 4, 4, 1, A, 4, B, 4, 1, C, 4);

If a remove -DMKL_DIRECT_CALL_SEQ the compilation works as expected.

Is this a bug or am I doing anything wrong?

Thanks,

Daniele

Matrix product with MKL

$
0
0

Hi,

I want to do a complicated matrix product which is defined as

C[i,j]  = \sum_{n,m} A[i,n]*A[j,n]* B[n,m] *A[i,m]*A[j,m] 

 Where A and B are two matrix with size of NxN, (N~1000).

To accomplish this task I just run four loops to creat the matrix C .

for(int i=0;i<ndim;i++)

for(int j=0;j<ndim;j++)

for(int n=0;n<ndim;n++)

for(int m=0;m<ndim;m++)

C[i,j]  +=  A[i,n]*A[j,n]* B[n,m] *A[i,m]*A[j,m]

 

Can anyone suggest any better implementation using MKL matrix product function?

Thanks in advance.

 

 

Viewing all 3005 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>