<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: unresolved symbols compiling PARDISO in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/unresolved-symbols-compiling-PARDISO/m-p/909402#M12007</link>
    <description>When you perform a static link by repeating the libraries, you may require 3 passes, probably with libmkl_intel_thread last in each group of 3. Is this method preferred for OSX, over the begin-group .. end-group method (which may require icpc 10.1.012 or newer)? Do you use extern "C" or equivalent header files for the MKL function names?&lt;BR /&gt;</description>
    <pubDate>Tue, 01 Apr 2008 06:59:22 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2008-04-01T06:59:22Z</dc:date>
    <item>
      <title>unresolved symbols compiling PARDISO</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/unresolved-symbols-compiling-PARDISO/m-p/909401#M12006</link>
      <description>Greetings,
&lt;BR /&gt;I downloaded the unsymmetric, real PARDISO example file in c from pardiso-project.org to see if I could get that to work properly.  I'm trying to compile it on a dual 3.0 GHz quad core machine running OSX 10.5 and using the em64t libraries.  I compile using the following:
&lt;BR /&gt;
&lt;BR /&gt;icpc real.cpp -L$MKLPATH/Libraries/em64t -I$MKLPATH/Headers -lmkl_solver_lp64 $MKLPATH/Libraries/em64t/libmkl_intel_lp64.a $MKLPATH/Libraries/em64t/libmkl_intel_thread.a $MKLPATH/Libraries/em64t/libmkl_core.a $MKLPATH/Libraries/em64t/libmkl_intel_lp64.a $MKLPATH/Libraries/em64t/libmkl_intel_thread.a $MKLPATH/Libraries/em64t/libmkl_core.a -lguide -lpthread
&lt;BR /&gt;
&lt;BR /&gt;This comes, more or less, directly out of the Intel PARDISO documentation.  The results are
&lt;BR /&gt;
&lt;BR /&gt;real.cpp(110): (col. 5) remark: LOOP WAS VECTORIZED.
&lt;BR /&gt;real.cpp(113): (col. 5) remark: LOOP WAS VECTORIZED.
&lt;BR /&gt;real.cpp(158): (col. 5) remark: LOOP WAS VECTORIZED.
&lt;BR /&gt;real.cpp(181): (col. 5) remark: LOOP WAS VECTORIZED.
&lt;BR /&gt;real.cpp(184): (col. 5) remark: LOOP WAS VECTORIZED.
&lt;BR /&gt;Undefined symbols:
&lt;BR /&gt;  "__Z8pardiso_PvPiS0_S0_S0_S0_PdS0_S0_S0_S0_S0_S0_S1_S1_S0_", referenced from:
&lt;BR /&gt;      _main in icc7s5WXT.o
&lt;BR /&gt;      _main in icc7s5WXT.o
&lt;BR /&gt;      _main in icc7s5WXT.o
&lt;BR /&gt;      _main in icc7s5WXT.o
&lt;BR /&gt;ld: symbol(s) not found
&lt;BR /&gt;
&lt;BR /&gt;The MKL path is included in my DYLD_LIBRARY_PATH.  Any suggestions would be appreciated.</description>
      <pubDate>Tue, 01 Apr 2008 03:52:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/unresolved-symbols-compiling-PARDISO/m-p/909401#M12006</guid>
      <dc:creator>ringlery</dc:creator>
      <dc:date>2008-04-01T03:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: unresolved symbols compiling PARDISO</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/unresolved-symbols-compiling-PARDISO/m-p/909402#M12007</link>
      <description>When you perform a static link by repeating the libraries, you may require 3 passes, probably with libmkl_intel_thread last in each group of 3. Is this method preferred for OSX, over the begin-group .. end-group method (which may require icpc 10.1.012 or newer)? Do you use extern "C" or equivalent header files for the MKL function names?&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Apr 2008 06:59:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/unresolved-symbols-compiling-PARDISO/m-p/909402#M12007</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2008-04-01T06:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: unresolved symbols compiling PARDISO</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/unresolved-symbols-compiling-PARDISO/m-p/909403#M12008</link>
      <description>Ok, I had forgotten the extern "C" and now the code links properly.  Now the problem is that I get a segmentation fault whenever the PARDISO routine is called.  Below is the slightly modified sample file that I'm using:
&lt;BR /&gt;
&lt;BR /&gt;/* -------------------------------------------------------------------- */
&lt;BR /&gt;/*      Example program to show the use of the "PARDISO" routine        */
&lt;BR /&gt;/*      on for unsymmetric linear systems                               */
&lt;BR /&gt;/* -------------------------------------------------------------------- */
&lt;BR /&gt;/*      This program can be downloaded from the following site:         */
&lt;BR /&gt;/*      &lt;A href="http://www.pardiso-project.org" target="_blank"&gt;http://www.pardiso-project.org&lt;/A&gt;                                  */
&lt;BR /&gt;/*                                                                      */
&lt;BR /&gt;/*  (C) Olaf Schenk, Department of Computer Science,                    */
&lt;BR /&gt;/*      University of Basel, Switzerland.                               */
&lt;BR /&gt;/*      Email: olaf.schenk@unibas.ch                                    */
&lt;BR /&gt;/* -------------------------------------------------------------------- */
&lt;BR /&gt;
&lt;BR /&gt;#include 
&lt;BR /&gt;#include 
&lt;BR /&gt;#include 
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;/* Change this, if your Fortran compiler does not append underscores. */
&lt;BR /&gt;/* e.g. the AIX compiler:  #define F77_FUNC(func) func                */
&lt;BR /&gt;
&lt;BR /&gt;/*#ifdef AIX
&lt;BR /&gt;#define F77_FUNC(func)  func     
&lt;BR /&gt;#else
&lt;BR /&gt;#define F77_FUNC(func)  func ## _
&lt;BR /&gt;#endif*/
&lt;BR /&gt;#define PARDISO pardiso_
&lt;BR /&gt;extern "C" {int PARDISO
&lt;BR /&gt;    (void *, int *, int *, int *, int *, int *, 
&lt;BR /&gt;     double *, int *, int *, int *, int *, int *, 
&lt;BR /&gt;     int *, double *, double *, int *);}
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;int main( void ) 
&lt;BR /&gt;{
&lt;BR /&gt;    /* Matrix data. */
&lt;BR /&gt;    int    n = 8;
&lt;BR /&gt;    int    ia[ 9] = { 0, 4, 7, 9, 11, 12, 15, 17, 20 };
&lt;BR /&gt;    int    ja[20] = { 0,    2,       5, 6, 
&lt;BR /&gt;                         1, 2,    4,
&lt;BR /&gt;                            2,             7,
&lt;BR /&gt;                               3,       6,
&lt;BR /&gt;                         1,
&lt;BR /&gt;                            2,       5,    7,
&lt;BR /&gt;                         1,             6,
&lt;BR /&gt;                            2,          6, 7 };
&lt;BR /&gt;    double  a[20] = { 7.0,      1.0,           2.0, 7.0, 
&lt;BR /&gt;                          -4.0, 8.0,      2.0,
&lt;BR /&gt;                                1.0,                     5.0,
&lt;BR /&gt;                                     7.0,           9.0,
&lt;BR /&gt;                          -4.0,
&lt;BR /&gt;                                7.0,           3.0,      8.0,
&lt;BR /&gt;                           1.0,                    11.0,
&lt;BR /&gt;                               -3.0,                2.0, 5.0 };
&lt;BR /&gt;
&lt;BR /&gt;    int      nnz = ia&lt;N&gt;;
&lt;BR /&gt;    int      mtype = 11;        /* Real unsymmetric matrix */
&lt;BR /&gt;
&lt;BR /&gt;    /* RHS and solution vectors. */
&lt;BR /&gt;    double   b[8], x[8];
&lt;BR /&gt;    int      nrhs = 1;          /* Number of right hand sides. */
&lt;BR /&gt;
&lt;BR /&gt;    /* Internal solver memory pointer pt,                  */
&lt;BR /&gt;    /* 32-bit: int pt[64]; 64-bit: long int pt[64]         */
&lt;BR /&gt;    /* or void *pt[64] should be OK on both architectures  */ 
&lt;BR /&gt;    void    *pt[64];
&lt;BR /&gt;
&lt;BR /&gt;    /* Pardiso control parameters. */
&lt;BR /&gt;    int      iparm[64];
&lt;BR /&gt;    int      maxfct, mnum, phase, error, msglvl;
&lt;BR /&gt;
&lt;BR /&gt;    /* Number of processors. */
&lt;BR /&gt;    int      num_procs;
&lt;BR /&gt;
&lt;BR /&gt;    /* Auxiliary variables. */
&lt;BR /&gt;    char    
*var;
&lt;BR /&gt;    int      i;
&lt;BR /&gt;
&lt;BR /&gt;    double   ddum;              /* Double dummy */
&lt;BR /&gt;    int      idum;              /* Integer dummy. */
&lt;BR /&gt;
&lt;BR /&gt;/* -------------------------------------------------------------------- */
&lt;BR /&gt;/* ..  Setup Pardiso control parameters und initialize the solvers      */
&lt;BR /&gt;/*     internal adress pointers. This is only necessary for the FIRST   */
&lt;BR /&gt;/*     call of the PARDISO solver.                                      */
&lt;BR /&gt;/* ---------------------------------------------------------------------*/
&lt;BR /&gt;      
&lt;BR /&gt;
&lt;BR /&gt;    /* Numbers of processors, value of OMP_NUM_THREADS */
&lt;BR /&gt;    var = getenv("OMP_NUM_THREADS");
&lt;BR /&gt;    if(var != NULL)
&lt;BR /&gt;        sscanf( var, "%d", &amp;amp;num_procs );
&lt;BR /&gt;    else {
&lt;BR /&gt;        printf("Set environment OMP_NUM_THREADS to 1");
&lt;BR /&gt;        exit(1);
&lt;BR /&gt;    }
&lt;BR /&gt;    iparm[2]  = num_procs;
&lt;BR /&gt;   
&lt;BR /&gt;    
&lt;BR /&gt;    maxfct = 1;         /* Maximum number of numerical factorizations.  */
&lt;BR /&gt;    mnum   = 1;         /* Which factorization to use. */
&lt;BR /&gt;    
&lt;BR /&gt;    msglvl = 1;         /* Print statistical information  */
&lt;BR /&gt;    error  = 0;         /* Initialize error flag */
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;/* -------------------------------------------------------------------- */    
&lt;BR /&gt;/* ..  Convert matrix from 0-based C-notation to Fortran 1-based        */
&lt;BR /&gt;/*     notation.                                                        */
&lt;BR /&gt;/* -------------------------------------------------------------------- */ 
&lt;BR /&gt;    for (i = 0; i         ia&lt;I&gt; += 1;
&lt;BR /&gt;    }
&lt;BR /&gt;    for (i = 0; i         ja&lt;I&gt; += 1;
&lt;BR /&gt;    }
&lt;BR /&gt; 
&lt;BR /&gt;/* -------------------------------------------------------------------- */    
&lt;BR /&gt;/* ..  Reordering and Symbolic Factorization.  This step also allocates */
&lt;BR /&gt;/*     all memory that is necessary for the factorization.              */
&lt;BR /&gt;/* -------------------------------------------------------------------- */ 
&lt;BR /&gt;    phase = 11; 
&lt;BR /&gt;
&lt;BR /&gt;    PARDISO (pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,
&lt;BR /&gt;		       &amp;amp;n, a, ia, ja, &amp;amp;idum, &amp;amp;nrhs,
&lt;BR /&gt;		       iparm, &amp;amp;msglvl, &amp;amp;ddum, &amp;amp;ddum, &amp;amp;error);
&lt;BR /&gt;    
&lt;BR /&gt;    if (error != 0) {
&lt;BR /&gt;        printf("
ERROR during symbolic factorization: %d", error);
&lt;BR /&gt;        exit(1);
&lt;BR /&gt;    }
&lt;BR /&gt;    printf("
Reordering completed ... ");
&lt;BR /&gt;    printf("
Number of nonzeros in factors  = %d", iparm[17]);
&lt;BR /&gt;    printf("
Number of factorization MFLOPS = %d", iparm[18]);
&lt;BR /&gt;   
&lt;BR /&gt;/* -------------------------------------------------------------------- */    
&lt;BR /&gt;/* ..  Numerical factorization.                                         */
&lt;BR /&gt;/* -------------------------------------------------------------------- */    
&lt;BR /&gt;    phase = 22;
&lt;BR /&gt;
&lt;BR /&gt;    PARDISO (pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,
&lt;BR /&gt;		       &amp;amp;n, a, ia, ja, &amp;amp;idum, &amp;amp;nrhs,
&lt;BR /&gt;		       iparm, &amp;amp;msglvl, &amp;amp;ddum, &amp;amp;ddum, &amp;amp;error);
&lt;BR /&gt;   
&lt;BR /&gt;    if (error != 0) {
&lt;BR /&gt;        printf("
ERROR during numerical factorization: %d", error);
&lt;BR /&gt;        exit(2);
&lt;BR /&gt;    }
&lt;BR /&gt;    printf("
Factorization completed ...
 ");
&lt;BR /&gt;
&lt;BR /&gt;/* -------------------------------------------------------------------- */    
&lt;BR /&gt;/* ..  Back substitution and iterative refinement.                      */
&lt;BR /&gt;/* ---------------------------------------------------------
----------- */    
&lt;BR /&gt;    phase = 33;
&lt;BR /&gt;
&lt;BR /&gt;    iparm[7] = 1;       /* Max numbers of iterative refinement steps. */
&lt;BR /&gt;
&lt;BR /&gt;    /* Set right hand side to one. */
&lt;BR /&gt;    for (i = 0; i         b&lt;I&gt; = 1;
&lt;BR /&gt;    }
&lt;BR /&gt;   
&lt;BR /&gt;    PARDISO (pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,
&lt;BR /&gt;		       &amp;amp;n, a, ia, ja, &amp;amp;idum, &amp;amp;nrhs,
&lt;BR /&gt;		       iparm, &amp;amp;msglvl, b, x, &amp;amp;error);
&lt;BR /&gt;   
&lt;BR /&gt;    if (error != 0) {
&lt;BR /&gt;        printf("
ERROR during solution: %d", error);
&lt;BR /&gt;        exit(3);
&lt;BR /&gt;    }
&lt;BR /&gt;
&lt;BR /&gt;    printf("
Solve completed ... ");
&lt;BR /&gt;    printf("
The solution of the system is: ");
&lt;BR /&gt;    for (i = 0; i         printf("
 x [%d] = % f", i, x&lt;I&gt; );
&lt;BR /&gt;    }
&lt;BR /&gt;    printf ("
");
&lt;BR /&gt;
&lt;BR /&gt;/* -------------------------------------------------------------------- */    
&lt;BR /&gt;/* ..  Convert matrix back to 0-based C-notation.                       */
&lt;BR /&gt;/* -------------------------------------------------------------------- */ 
&lt;BR /&gt;    for (i = 0; i         ia&lt;I&gt; -= 1;
&lt;BR /&gt;    }
&lt;BR /&gt;    for (i = 0; i         ja&lt;I&gt; -= 1;
&lt;BR /&gt;    }
&lt;BR /&gt;
&lt;BR /&gt;/* -------------------------------------------------------------------- */    
&lt;BR /&gt;/* ..  Termination and release of memory.                               */
&lt;BR /&gt;/* -------------------------------------------------------------------- */ 
&lt;BR /&gt;    phase = -1;                 /* Release internal memory. */
&lt;BR /&gt;
&lt;BR /&gt;    PARDISO (pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,
&lt;BR /&gt;		       &amp;amp;n, &amp;amp;ddum, ia, ja, &amp;amp;idum, &amp;amp;nrhs,
&lt;BR /&gt;		       iparm, &amp;amp;msglvl, &amp;amp;ddum, &amp;amp;ddum, &amp;amp;error);
&lt;BR /&gt;
&lt;BR /&gt;    return 0;
&lt;BR /&gt;}
&lt;BR /&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/N&gt;</description>
      <pubDate>Tue, 01 Apr 2008 22:09:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/unresolved-symbols-compiling-PARDISO/m-p/909403#M12008</guid>
      <dc:creator>ringlery</dc:creator>
      <dc:date>2008-04-01T22:09:33Z</dc:date>
    </item>
  </channel>
</rss>

