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

mkl_sparse_d_mv returns different values than mkl_dcsrsymv

$
0
0

Hello,

 

we are updating the code in my organisation to get rid of the deprecated SPBLAS functions. Our software makes some structure calculations with sparse matrices codified as CSR  (symmetric, upper, one-based indexes, non-unit diagonal) and force/displacement vectors. Until now we were using mkl_dscrsymv to multiply matrix by vector (we were obtaining exactly the same values codifying the vector as a one-row matrix and using mkl_dcsrmm because we experimented some segmentation faults with an older MKL version; btw, we are working with MS Visual Studio C++ on an Intel Core i7).

The fact is, all our operations with the Inspector-Executor functions (building the matrix from a COO, adding, even the results from PARDISO) are ok, but the multiplication with mkl_sparse_d_mv return a few significativelly different values than the deprecated functions, and that makes our structures fail. For instance, with a rank=1792 and a vector with 496 non-zero values, we find 144 different values in the multiplication, 36 of them being significally different (at least 1% in absolute value).

This is the code for the operation V_out = M x V_in :

    matrix_descr matrix_descr;
    matrix_descr.type = sparse_matrix_type_t::SPARSE_MATRIX_TYPE_SYMMETRIC;
    matrix_descr.mode = sparse_fill_mode_t::SPARSE_FILL_MODE_UPPER;
    matrix_descr.diag = sparse_diag_type_t::SPARSE_DIAG_NON_UNIT;

    sparse_status_t res = mkl_sparse_d_mv (sparse_operation_t::SPARSE_OPERATION_NON_TRANSPOSE, 1.0, M, matrix_descr, V_in, 0.0, V_out);

The return value is always sparse_status_t::SPARSE_STATUS_SUCCESS, but the values returned into V_out do not match the ones expected.

Is this a problem you were aware of, or have I found some bug?

 

Thanks,

David B.


Slight Discrepancies in AXPY results vs explicit loops

$
0
0

Hi,

In some of our codes, we have noticed some slight discrepancies in the results when using MKL AXPY calls and our own explicit loops to calculate Y=Y+ALPHA*X.  When we are performing iterative matrix solutions, the final solutions using AXPY can be significantly worse than the solutions using explicit loops instead of AXPY. 

I've attached a test case under 64-bit MS Windows using Intel MKL 2019 update 2.  For some vectors and scale factors, the results are identical down to machine precision. For other vector and scale factor combinations, you can barely maintain the specified floating point precision.  In the attached screen shot, the left column of numbers shows the RMS error between the AXPY result and the explicit loop result for two cases.  In the first case, the two results are different and in the second case no difference is discernible between the two results.  Since AXPY loops have no dependencies between vector entries, it does not seem like it could be a threading issue.  While we are aware that floating point operations are always tricky, we don't understand why independent operations of y(i) = y(i) + alpha*x(i) are returning such different results.

We've tried the various suggestions from the documentation about getting repeatable floating point solutions to no avail.  Any advice would be much appreciated.  Is this just to be expected or is there some other MKL issue going on?

Thanks,

John

AttachmentSize
Downloadapplication/zipxaxpy.zip828.48 KB
Downloadimage/pngscreen_output.png71.95 KB

Error building application with mkl

$
0
0

I am having issues with build an application. When running make, it runs successfully until linking the executable. There I encounter the following error: "ld: library not found for -liomp5". I tried building the examples in mkl library and there were no problems. The MKLROOT has been set to the intel's default install location. Any idea how could I solve this issue?

I am using MacOS 10.13.6.

Intel® Parallel Studio XE 2019 On linux

$
0
0

Hi,

I've been using parallel studio xe 2019 for evaluation on linux. I had a problem when compiling a very simple test fortran code using

"ifort source.f90 -mkl -qopenmp" it was working on the development machine but when used on a different machine where the parallel studio is not installed i was getting the error: "error while loading shared libraries". What i did is i copied the file libiomp5.so to usr/lib in the virgin machine so that the simple code with print number of threads works. However, when i just introduced to the code the pardiso solver from mkl, the code works on the development machine but on the virgin machine i'm getting: "kmp_aligned_malloc version VERSION not defined in file libiomp5.so with link time reference".

Any help is appreciated.

Thanks !

Trunst Region optimization dtrnlsp_solve aborts intermittently returning 1502

$
0
0

I'm calling dtrnlsp_solve from C++.   Depending on changes to the surrounding code, compile options (debug vs optimized) etc, Sometimes it works, sometimes it fails on the first call, returning code 1502.  What does the code mean?   Any suggestions on how to fix it? I can't find anything wrong in my code.

CENTRAL_MKL_LIB = /depot/intel/math_kernel_library_2018.1.163/mkl

MATH_LIBS_linux64      = -Wl,--start-group $(CENTRAL_MKL_LIB)/intel64/libmkl_intel_lp64.a $(CENTRAL_MKL_LIB)/intel64/libmkl_sequential.a $(CENTRAL_MKL_LIB)/intel64/libmkl_core.
a -Wl,--end-group -lpthread -lm

For a while it was working if compiled optimized but aborting if compiled debug.  Then I included the call to dtrnlsp_check (see below) and then it would work compiled debug but not optimized.  Then I change some code an another file and now it always fails??? 

double *xx = (double*) malloc (sizeof (double)*nn);
  double *fjac = (double*) malloc (sizeof (double)*nn*sz2);
  double *fvec= (double*) malloc (sizeof (double)*sz2);
  for(int i=0; i<nn; i++) xx[i]=0.0;
  for(int i=0; i<sz2*nn; i++) fjac[i]=0.0;
  for(int i=0; i<sz2; i++) fvec[i]=0.0;
  double eps[6]={.00001, 0.00001, 0.00001, 0.00001, 0.00001, 0.00001};
  MKL_INT iter1=100;
  MKL_INT iter2=10;
  double rs=0.0;
  int res = dtrnlsp_init(&handle, &nn, &sz2, xx, eps, &iter1, &iter2, &rs);
  if(res != TR_SUCCESS) {
    printf("ERROR SCE dtrnlsp_init failed\n");
    exit(1);
  }
#if 0 
  MKL_INT info[6];
  res = dtrnlsp_check(&handle, &nn, &sz2, fjac, fvec, eps, info);
  if(res != TR_SUCCESS) {
    printf("ERROR SCE dtrnlsp_check failed  code=%d\n", res);
    exit(1);
  }
#endif
  MKL_INT  RCI_Request;
  int success=0;
  while(success == 0){
    res = dtrnlsp_solve(&handle, fvec, fjac, &RCI_Request);
    if(res != TR_SUCCESS) {
      printf("ERROR SCE dtrnlsp_solve failed code=%d\n", res);
      exit(1);
    }

......

Thanks

Greg

Batch normalization implementation

mkl_sparse_d_create_csc different definitions

$
0
0

Hi,

I'm having a problem with CSC type sparse matrix generation. The function mkl_sparse_d_create_csc is defined in the intel MKL documentation in the following manner:

sparse_status_t mkl_sparse_d_create_csc (sparse_matrix_t       *A,
                                                                sparse_index_base_t indexing,
                                                                MKL_INT rows,
                                                                MKL_INT cols,
                                                                MKL_INT *cols_start,
                                                                MKL_INT *cols_end,
                                                                MKL_INT *row_indx,
                                                                double *values);

However in the header mkl_spblas.h it is defined differently:

sparse_status_t mkl_sparse_d_create_csc(sparse_matrix_t        *A,
                                                               sparse_index_base_t    indexing, /* indexing: C-style or Fortran-style */
                                                               MKL_INT    rows,
                                                               MKL_INT    cols,
                                                               MKL_INT    *rows_start,
                                                               MKL_INT    *rows_end,
                                                               MKL_INT    *col_indx,
                                                               double        *values );

The definition in the documentation seems to look like a true definition of a CSC type matrix however the definition in the header file looks like a CSR type sparse matrix definition. When I try generating a CSC matrix I get a memory access violation. However I manually checked the input vectors and they are all correctly specified as in the documentation. So I wonder, since the function looks to be defined in the header like a CSR format sparse matrix, should I also give it in this structure?

I'm using MKL version 2019.0.2 for windows.

Thanks for the help,

Adriaan

MKL Feast (inner memory problem: info=-2)

$
0
0

Hi,

i'm trying to solve (sparse) symmetric generalized eigenvalue problems using dfeast_scrgv().

It always worked fine with relatively small problems (up to 2000*2000 sparse matrix), but it turned out i can't solve the bigger ones (about 60000*60000 sparse matrix) as it always returns 'info = -2", that I know it refers to inner memory problems, but I don't know how to fix it.

The problem is solvable using other algorithms (not  included in MKL).

I'm using the latest Intel MKL 2019 library and Intel C++ Compiler 19.0 on Visual Studio 2013 Platform Toolset.

May I ask you for some help?

Thanks in advance,

Daniele

 

 

 


Linking MKL in the makefile

$
0
0

Hi:

     I went to the intel-mkl-link-line-advisor , and got the following:

Use this link line: 

  ${MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_cdft_core.a ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_blacs_openmpi_lp64.a -Wl,--end-group -liomp5 -lpthread -lm -ldl

Compiler options: 

 -I${MKLROOT}/include

  Please tell me how to include them in the makefile.

 

Thanks,

 

cblas_ddot access violation

$
0
0

Hi,

I was just trying to learn how to use the 64 bit platform on Parallel Studio XE, when running a very simple example (using cblas_ddot() - as shown below)  I've got the following exception:

Exception thrown at 0x00007FF7AA60EB36 in mkl64bit.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

Then I tried the Intel Inspector tool and it says there was an invalid memory access: 0x1eb36    vmovsd xmm4, qword ptr [r9+rax*8]

The code is:

int main() {
    double v1[3], v2[3];
    for (size_t i = 0; i != 3; ++i)
        v1[i] = v2[i] = 1.5;

    double result;
    result = cblas_ddot(3, v1, 1, v2, 1);

    return 0;}

I'm using Intel Parallel Studio XE Cluster Edition 2019 for Windows on Visual Studio 2017.

May you please help me to understand what's wrong and how could I fix the problem?

Thanks in advance,

Daniele

MKL_SPARSE_D_TRSM ............ no result when called from fortran

$
0
0

Hi

the program below implements a "csr" class which holds a sparse csr matrix copied from the mkl manual. This matrix is used for Inspector-Executor routines MKL_SPARSE_D_CREATE_CSR, MKL_SPARSE_COPY and MKL_SPARSE_D_TRSM. All routines finish without error. However, MKL_SPARSE_D_TRSM does not seem to solve for anything. Am I doing something wrong here??

include "mkl_spblas.f90"
Module Data_Kind
  Implicit None
  Integer, Parameter :: Large=Selected_Int_Kind(12)
  Integer, Parameter :: Medium=Selected_Int_Kind(8)
  Integer(Medium), Parameter :: Double=Selected_Real_Kind(15,100)
End Module Data_Kind
Module Mod_csr
  use data_kind
  implicit None
  Type :: csr
    integer(large), allocatable :: nrows, ncols
    integer(large), allocatable :: rowpos(:), colpos(:),&
      & pointerB(:), pointerE(:)
    real(double), allocatable :: values(:)
  contains
    Procedure :: iii => Subiii
  end type csr
contains
  Subroutine Subiii(this)
    Implicit None
    Class(csr), intent(inout) :: this
    !!2017 mkl manual page 3233
    allocate(this%nrows,this%ncols,source=5)
    allocate(this%rowpos(6),source=(/1,4,6,9,12,14/))
    allocate(this%colpos(13),source=(/1,2,4,1,2,3,4,5,1,3,4,2,5/))
    allocate(this%pointerB(5),source=(/1,4,6,9,12/))
    allocate(this%pointerE(5),source=(/4,6,9,12,14/))
    allocate(this%values(13),&
      &source=(/1.0D0,-1.0D0,-3.0D0,-2.0D0,5.0D0,&
      &4.0D0,6.0D0,4.0D0,-4.0D0,2.0D0,7.0D0,8.0D0,-5.0D0/))
  end Subroutine Subiii
End Module Mod_Csr
Program Test
  use data_kind
  USE IFPORT
  use Mod_csr, only: csr
  use MKL_SPBLAS
  USE, INTRINSIC :: ISO_C_BINDING
  Implicit none
  Type(csr) :: tscsr
  integer(c_int) :: isstat=0
  Type(Sparse_Matrix_T) :: handle, handle1
  Type(MATRIX_DESCR) :: descr
  real(double), allocatable :: in(:,:), out(:,:)
  outer:block
    descr%TYPE=SPARSE_MATRIX_TYPE_GENERAL
    descr%DIAG=SPARSE_DIAG_NON_UNIT
    call tscsr%iii()
    isstat=MKL_SPARSE_D_CREATE_CSR(&
      &handle,&
      &SPARSE_INDEX_BASE_ONE,&
      &tscsr%nrows,&
      &tscsr%ncols,&
      &tscsr%pointerB,&
      &tscsr%pointerE,&
      &tscsr%colpos,&
      &tscsr%values&
      &)
    if(isstat/=0) Then
      write(*,*) "error 1 ",isstat;exit outer
    End if
    isstat=mkl_sparse_copy(handle,descr,handle1)
    if(isstat/=0) Then
      write(*,*) "error 2 ",isstat;exit outer
    End if
    allocate(in(tscsr%nrows,2),out(tscsr%nrows,2))
    in=1.0;out=0.0
    isstat=MKL_SPARSE_D_TRSM(&
      &SPARSE_OPERATION_NON_TRANSPOSE,&
      &1.0_double,&
      &handle1,&
      &descr,&
      &SPARSE_LAYOUT_COLUMN_MAJOR,&
      &in,&
      &2,&
      &size(in,1),&
      &out,&
      &size(out,1)&
      &)
    if(isstat/=0) Then
      write(*,*) "error 3 ",isstat;exit outer
    end if
    write(*,*) maxval(in), maxval(out), minval(out)
  end block outer
End Program Test

Matrix "out" is supposed to contain the sum over the rows of the inverse of the sparse matrix. But "out" contains only zeros. Also isstat from MKL_SPARSE_D_TRSM does not indicate any error.

The compiling and linking was:

ifort --version
ifort (IFORT) 19.0.2.187 20190117

ifort -i8 -warn nounused -warn declarations -O3 -static -align array64byte -mkl=parallel -qopenmp -parallel -c -o OMP_MKLPARA_ifort_4.20.12-arch1-1-ARCH/Test.o Test.f90 -I /opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/include/

ifort -i8 -warn nounused -warn declarations -O3 -static -align array64byte -mkl=parallel -qopenmp -parallel -o Test_OMP_MKLPARA_4.20.12-arch1-1-ARCH OMP_MKLPARA_ifort_4.20.12-arch1-1-ARCH/Test.o /opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/lib/intel64/libmkl_blas95_ilp64.a /opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/lib/intel64/libmkl_lapack95_ilp64.a -Wl,--start-group /opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/lib/intel64/libmkl_intel_ilp64.a /opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/lib/intel64/libmkl_core.a /opt/intel/compilers_and_libraries_2019.2.187/linux/mkl/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -lpthread -lm -ldl

 

Any suggestion?

pardiso out of memory (-2) in phase 33

$
0
0

Hi,

pardiso stops with error message -2 in phase 33 when increasing the number of rhs from 600 to 700. 600 rhs runs fine with a memory use  of 146.2GB ("RES") reported by "top". The system has 256GB of RAM, so there is still +40% left. What is the issue when increasing #rhs by 100??

Thanks

Issues compiling MATLAB mex with Intel MKL PARDISO

$
0
0

I am quite new to writing mex files, and to the MKL. I need to interface the PARDISO solver with a MATLAB code of mine, for solving of large finite element matrices. When compiling my mex code, I am having some issues. MATLAB gives me the error message:

Error using mex
   Creating library fem_mex_pardiso.lib and object fem_mex_pardiso.exp
fem_mex_pardiso.obj : error LNK2019: unresolved external symbol pardiso referenced in function mexFunction
fem_mex_pardiso.mexw64 : fatal error LNK1120: 1 unresolved externals

This occurs when I submit the command

mex -R2018a fem_mex_pardiso.c -I'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.2.190\windows\mkl\include\'

I am sure that it is that I am not linking something properly, but I honestly am quite new to interfacing MATLAB with external libraries.

Here is the c - code that gives the errors:

/*==========================================================
 * fem_mex_pardiso.ca
 *==========================================================*/
 
 // Include headers
 #include "mex.h"
 #include "mkl.h"
 #include "mkl_pardiso.h"
 #include "mkl_types.h"

 void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
 {
    // Define variables
    double *a, *rf_glob, *u_qct, ddum;
    int num_rows, i;
    void *pt[64];
    MKL_INT *ia, *ja, n, iparm[64], maxfct, mnum, phase, error, msglvl, mtype, idum;
    
    // Argument checks
    if (nlhs > 1)
    {
        mexErrMsgTxt("Too many outputs!");
    }
    if (nrhs != 4) // Should be 3 matrices for the CSR3 format of k_glob, and one column vector for rf_glob
    {
        mexErrMsgTxt("Need four inputs! (3 vectors for the sparse stiffness matrix, and one for the load vector)");
    }
    
    // Get the sparse matrix inputs
    ia = mxGetInt32s(prhs[0]); // Contains the indices of the first non-zero element in each row of a. Note, the last index of ia is the number of non-zero elements in a, plus one
    ja = mxGetInt32s(prhs[1]); // Contains the global column indices of every element in a
    a = mxGetDoubles(prhs[2]); // Non-zero elements of stiffness matrix
    
    // Number of equations is equal to length of the reaction force vector
    rf_glob = mxGetDoubles(prhs[3]);
    num_rows = mxGetM(prhs[3]);
    n = num_rows;
    
    // Configure out-of-core settings
    //setenv('MKL_PARDISO_OOC_PATH', 'C:\Users\dylan\Documents\School\Masters\01_Main_MSc\02_Codes\13_INTEL_MKL_Matlab\OutOfCore_Memory\ooc_file');
    //setenv('MKL_PARDISO_OOC_MAX_CORE_SIZE', '12288');
    //setenv('MKL_PARDISO_OOC_MAX_SWAP_SIZE', '8192');
    //setenv('MKL_PARDISO_OOC_KEEP_FILE', '0');
    
    // Setup solver
        // Iniitialize values for solver parameters
    maxfct = 1; // Maximal number of factors in memory
    mnum = 1; // Number of matrices to solve
    mtype = -2; // Matrix type (Here, real and symmetric positive indefinite. For real and symmetric positive definite, use 2)
    // Initialize the parameters
    for (i = 0; i < 64; i++)
    {
        iparm[i] = 0;
    }    
    iparm[0] = 1; // Not using default solver parameters
    iparm[1] = 3; // Fill-in reducing ordering from METIS, parallelized with OpenMP
    iparm[3] = 0; // Not using an iterative algorithm
    iparm[4] = 0; // Not using a user-specified fill-in reducing permutation
    iparm[5] = 0; // Write solution into u_qct
    iparm[7] = 2; // Maximum number of iterative refinement steps
    iparm[9] = 13; // Perturb pivot elements by 1E-13 to deal with near-zero or zero pivots
    iparm[10] = 0; // No scaling (because we will be reording to a symmetric matrix)
    iparm[12] = 0; // No symmetric weighted matching
    iparm[13] = 0; // Zero perturbed pivots
    iparm[17] = -1; // Number of non-zeros in the factor LU
    iparm[18] = -1; // Mfloprs for LU factorization
    iparm[19] = 0; // Number of CG iterations
    iparm[34] = 1; // Use C-style indexing for ia and ja arrays
    iparm[60] = 1; // Use out-of-core memory if out of RAM
    msglvl = 0; // Do not print statistical information file
    error = 0; // Initialize error flag
        // Initialize the solver pointer
    for (i = 0; i < 64; i++)
    {
        pt[i] = 0;
    }    
    
    // Begin solving
    
    // Step 1 - Reordering and symbolic factorization
    phase = 11;
    PARDISO (pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &idum, &nrhs, iparm, &msglvl, &ddum, &ddum, &error);
    if (error != 0)
    {
        printf("\n ERROR during symbolic factorization: %d", error);
        exit(1);
    }
    printf("\nReordering completed ... ");
    printf("\nNumber of nonzeros in factors = %d", iparm[17]);
    printf("\nNumber of factorization MFLOPS = %d", iparm[18]);
 }

 

Any help is greatly appreciated. Thankyou!

Intel MKL and IPP licensing

$
0
0

Hello.

 

Can you tell me if MKL and IPP (Intel Performance Primitives) are free to use in third-party proprietary programs?

Composer 2019 up2 -- Link error: _powf already defined in mkl_core.lib

$
0
0

Hello,

Since I upgraded Composer from 2018 up3 to 2019 up2 I am getting linker errors such as: libmmd.lib(libmmd.dll) : : error LNK2005: _powf already defined in mkl_core.lib(_avx512_dgetri_small.obj). 

It appears when I am try to compile with ICC in 32bit (/Qm32) and disable optimization (/QOd). It compiles and links well with /Qm32 and optimization options (/O3, or /O2, ...). It also compiles and links fine in 64bit (/Qm64) with or without optimization.

You may reproduce with this simple code:

void AvxCopulaFunction::claytonCopulaIterationF(float* correlatedUniforms,const float* notCorrelatedUniforms,const float coeff1,const int length)
{
  __pragma(ivdep)
  for (int i = 0; i < length; i++)
  {
    correlatedUniforms[i] = pow(1.0f + notCorrelatedUniforms[i], coeff1);
    // double precision version of "pow" works fine !
    //correlatedUniforms[i] = pow(1.0 + (double)notCorrelatedUniforms[i], (double)coeff1);
  }
}

int AvxCopulaFunction::inverseLUFactoredSquareMatrix(double* matrixToOverwrite,int* inputPivotVector,const int matrixRank)
{
  return LAPACKE_dgetri( LAPACK_ROW_MAJOR, matrixRank, matrixToOverwrite, matrixRank, inputPivotVector );
}

Could you please have a look ?

My command lines are in attachment, let me know if you need more information.

I found this topic, it is maybe related: Linker errors with Visual Fortran Compiler 19.0.1.144

My config: Win10 x64, Visual Studio 2013, Composer 2019 up2

Regards,

Guillaume A.


[HPCG] Compilation with GCC//GOMP/OpenMPI - error at run-time

$
0
0

Hello everyone,

 

Brief summary of the issue:

  • GCC version: 7.3.0;
  • An hybrid OpenMP/MPI version of HPCG was compiled from the source code delivered with the Intel MKL;
  • It was linked to OpenMPI-3.0.1, and MKL 2018.3.222;
  • The compilation and the linkage complete without any error nor warnings;
  • At run-time, when executed on a compute node with 2 sockets (E5-2620 v4) - 2 MPI ranks, 8 OpenMP threads per rank - an error raised in src/CheckProblem.cpp of the HPCG source code. The hpcg.dat file being used is the default one (192 192 192).

 

Some more details:

  • The setup file associated with the compilation/linkage of HPCG is attached to this message;
  • In order to run HPCG, I used the following commands:
export OMP_NUM_THREADS=8 ; mpirun -np 2 ./xhpcg_avx2
  • The aforementioned run-time error is the following:
xhpcg_avx2: src/CheckProblem.cpp:123: void CheckProblem(const SparseMatrix&, Vector*, Vector*, Vector*): Assertion `*currentIndexPointerG++ == curcol' failed

 

Please, feel free to ask any piece of information you think might be helpful, I'll do my best to provide it.

 

Thank you in advance for help,

--Mathieu.

AttachmentSize
Downloadtext/plainsetup.txt5.61 KB

How to operate with integral types on MKL

$
0
0

Hi all,

I'm pretty new to the MKL world and I'm starting to practice with the API, but I cant found anything in the documentation about operating with integral types with MKL. For example, I will like to use the 'mkl_?omatcopy' function with a matrix of shorts, but there are only functions for double and float types.

Am i missing something? In case that there's no way to use integral types in MKL, which is the alternative?.

Thanks a lot for the support given,

Greetings.

Crash in Link MKL DFTI library from VS C++ x64

$
0
0

I would like to use MKL FFT functions in C++ of VS 2013 on Windows x64 system. What I have done are:
1. Run test example C program, MKL FFT functions work OK
2. Run my x64 program without calls to MKL FFT functions, it works also OK
3. Add call to MKL FFT functions in my C++ classes which are built into a dll called Utility, my whole program compiles OK
4. Run my program which links the Utility.dll that calls to MKL FFT functions, it crashed with "System.DllNotFoundExeption"
5. The “DllNotFound” didn’t refer to Utility.dll that calls the MKL FFT functions. It complaints about APICreatedBySWIG.dll not found.
APICreatedBySWIG.dll is a dll generated by the SWIG that converts my selected C++ functions to C# and Python interfaces wrapper.
6. To simplify the case, I exclude, in the SWIG conversions, all of those functions that call MKL FFT. In other words, APICreatedBySWIG.dll doesn’t contain any of those functions that call MKL FFT.
7. Comment out the calls to MKL FFT functions, my program starts working again
8. Replace the calls to MKL FFT functions with MKL Convolve functions in VSL, my program run beautifully without any issue
9. To investigate the dependency of the MKL FFT functions, I have load the the Utility.dll on “Dependency Walker”, which shows some MKL functions in red and an error: At least one module has an unresolved import ...... (please see attachement)

To resolve this issue I need your help urgently. It would be greatly appreciated if you can shed some light on searching the answer for
1. which dll actually missing during run time and which dll the MKL function MKL DftiComputeForward actually depends on?
2. why loading APICreatedBySWIG.dll crashes when is doesn’t contain the function that calls MKL DftiComputeForward in C++ class?
3. are there some special requirements for linking those MKL libraries tjhat are in red on “Dependency Walker”?
4. Is crash due to my x64 system conflicts with some MKL library which are 32bit?

My system:
1. Xeon E5-2650 v3
2. Windows 7 Professional 64-bit
3. Visual Studio 2013
5. VS C++
6. boost_1_68_0
7. SWIG to convert selected C++ functions to C# or Python interface wrappers
8. Intel® Parallel Studio installed (compilers_and_libraries_2019.1.144 & Intel C++ Compiler 19.0)
9. Use Intel MKL = Parallel

Please let me know if any additional information is needed.

How to compute1D FFT of 2D array in another dimension without reshaping the array.

$
0
0

I want to compute 1D FFT of a 2D array stored as a 1D array in another dimension. For example the 2D array is stored as:

for(int j=0; j<NJ; j++) //rows
{
    for(int i=0; i<NI; i++) //colums
        {
            Ori_2D_array[i+j*NI]=1.0;
        }
}

Now I want to compute the 1D FFT of the  Ori_2D_array in the row dimension. The only way I can think out is reshaping the Ori_2D_array then doing the fft:

for (int i=0; i<NI; i++)
{
  for (int j=0; j<NJ; j++)
    {
      2D_array[j+i*NJ]=Ori_2D_array[i+j*NI];
    }
}


DFTI_DESCRIPTOR_HANDLE desc_x = 0;
DftiCreateDescriptor(&desc_x, DFTI_PREC, DFTI_COMPLEX, 1, NJ);
DftiSetValue(desc_x, DFTI_NUMBER_OF_TRANSFORMS, NI);
DftiSetValue(desc_x, DFTI_INPUT_DISTANCE,  NJ);
DftiCommitDescriptor(desc_x);
DftiComputeForward(desc_x, 2D_array);

Reshaping Ori_2D_array wasting too much time. Is there anyway to do the FFT without reshaping Ori_2D_arra.

Please advise!

Intel® MKL version 2019 Update 3 is now available

$
0
0

Intel® Math Kernel Library (Intel® MKL) is a highly optimized, extensively threaded, and thread-safe library of mathematical functions for engineering, scientific, and financial applications that require maximum performance.

Intel MKL 2019 Update 3 packages are now ready for download.

Intel MKL is available as part of the Intel® Parallel Studio XE and Intel® System Studio. Please visit the Intel® Math Kernel Library Product Page.

Please see What's new in Intel MKL 2019 and in MKL 2019 Update 3 follow this link - https://software.intel.com/en-us/articles/intel-math-kernel-library-rele...

and here is the link to the MKL 2019 Bug Fix list - https://software.intel.com/en-us/articles/intel-math-kernel-library-2019...

Viewing all 2652 articles
Browse latest View live