<?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 Gennady, i use mkl 2019.5 . in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/invalid-parameters-during-initialization-Nonlinear-Least-Squares/m-p/1126994#M25328</link>
    <description>&lt;P&gt;Gennady, i use mkl 2019.5 .&lt;/P&gt;&lt;P&gt;This is not a MKL issue. I compiled from under QtCreator. That was the problem. And the program was collected and started. And what is the strangest thing, the INFO parameter was 0,0,0,0,0,0. =)&lt;BR /&gt;Thanks for the answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 26 Oct 2019 08:27:45 GMT</pubDate>
    <dc:creator>igor__fedyaev</dc:creator>
    <dc:date>2019-10-26T08:27:45Z</dc:date>
    <item>
      <title>invalid parameters during initialization Nonlinear Least Squares Problem without Constraints</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/invalid-parameters-during-initialization-Nonlinear-Least-Squares/m-p/1126991#M25325</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I programmed a not-so-complicated code to solve a nonlinear equation. But unfortunately all the time at initialization I receive an error in input parameters. Please tell me what's wrong. The code is below.When I comment on the result check after the strnlsp_init function, the strnlsp_check function succeeds.&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt;#include &amp;lt;iostream&amp;gt;
#include &amp;lt;vector&amp;gt;
#include &amp;lt;iomanip&amp;gt;

#include "mkl_rci.h"
#include "mkl_types.h"
#include "mkl_service.h"


int main()
{
    std::vector&amp;lt;float&amp;gt; fjac = {
        0,1.0,
        1,1.0,
        2,1.0,
        4,1.0,
        5,1.0
    };

    std::cerr &amp;lt;&amp;lt; "size fjac = " &amp;lt;&amp;lt; fjac.size() &amp;lt;&amp;lt; std::endl;

    /* n - number of function variables
       m - dimension of function value */
    MKL_INT n = 2, m = 5;

    std::cerr &amp;lt;&amp;lt; "n = " &amp;lt;&amp;lt; n &amp;lt;&amp;lt; std::endl;
    std::cerr &amp;lt;&amp;lt; "m = " &amp;lt;&amp;lt; m &amp;lt;&amp;lt; std::endl;

    std::vector&amp;lt;float&amp;gt; fvec = {
       2.1,
       2.4,
       2.6,
       2.8,
       3.0
    };
    std::cerr &amp;lt;&amp;lt; "size fvec = " &amp;lt;&amp;lt; fvec.size() &amp;lt;&amp;lt; std::endl;

    std::vector&amp;lt;float&amp;gt; x ={
       0.0,
       0.0
    };
    std::cerr &amp;lt;&amp;lt; "size x = " &amp;lt;&amp;lt; x.size() &amp;lt;&amp;lt; std::endl;

    _TRNSP_HANDLE_t handle = nullptr;   // TR solver handle

    /* results of input parameter checking */
    MKL_INT info[6];

    /* precisions for stop-criteria (see manual for more details) */

    std::vector&amp;lt; float &amp;gt; eps;
    eps.resize(6);
    /* set precisions for stop-criteria */
    for (int32_t i = 0; i &amp;lt; static_cast&amp;lt;int32_t&amp;gt;(eps.size()); ++i)
    {
        eps&lt;I&gt; = 0.00001;
    }
    /* iter1 - maximum number of iterations
       iter2 - maximum number of iterations of calculation of trial-step */
    MKL_INT iter1 = 1000, iter2 = 100;
    /* initial step bound */
    float rs = 0.0;

    MKL_INT res;

    if(m &amp;gt;= n){
        std::cerr &amp;lt;&amp;lt; "YES\n";
    }
    else{
        std::cerr &amp;lt;&amp;lt; "NO\n";
    }

    res = strnlsp_init(&amp;amp;handle,
                       &amp;amp;n, &amp;amp;m,
                       x.data(),
                       eps.data(),
                       &amp;amp;iter1, &amp;amp;iter2,
                       &amp;amp;rs) ;

    std::cerr &amp;lt;&amp;lt; "res = " &amp;lt;&amp;lt; res &amp;lt;&amp;lt; std::endl;

    if(res != TR_SUCCESS)
    {
        if(res == TR_INVALID_OPTION){
           std::cerr &amp;lt;&amp;lt; "there was an error in the input parameters.\n";
        }
        if(res == TR_OUT_OF_MEMORY){
            std::cerr &amp;lt;&amp;lt; "there was a memory error.\n";
        }

        /* if function does not complete successfully then print error message */
        std::cerr &amp;lt;&amp;lt; "| error in dtrnlsp_init" &amp;lt;&amp;lt; std::endl;
        /* Release internal Intel(R) MKL memory that might be used for computations         */
        /* NOTE: It is important to call the routine below to avoid memory leaks   */
        /* unless you disable Intel(R) MKL Memory Manager                                   */
        MKL_Free_Buffers ();
        return -1;
    }

    /* Checks the correctness of handle and arrays containing Jacobian matrix,
           objective function, lower and upper bounds, and stopping criteria. */
    if (strnlsp_check (&amp;amp;handle, &amp;amp;n, &amp;amp;m, fjac.data(), fvec.data(), eps.data(), info) != TR_SUCCESS)
    {
        std::cerr &amp;lt;&amp;lt; "info:\n";
        for(int32_t i = 0; i &amp;lt; 6; ++i){
            std::cerr &amp;lt;&amp;lt; info&lt;I&gt; &amp;lt;&amp;lt; ",";
        }
        std::cerr &amp;lt;&amp;lt; std::endl;
        /* if function does not complete successfully then print error message */
        std::cerr &amp;lt;&amp;lt; "| error in dtrnlsp_init\n" &amp;lt;&amp;lt; std::endl;
        /* Release internal Intel(R) MKL memory that might be used for computations         */
        /* NOTE: It is important to call the routine below to avoid memory leaks   */
        /* unless you disable Intel(R) MKL Memory Manager                                   */
        MKL_Free_Buffers ();
        /* and exit */
        return -1;
    }

    std::cerr &amp;lt;&amp;lt; "info:\n";
    for(int32_t i = 0; i &amp;lt; 6; ++i){
        std::cerr &amp;lt;&amp;lt; info&lt;I&gt; &amp;lt;&amp;lt; ",";
    }
    std::cerr &amp;lt;&amp;lt; std::endl;

/* solve code */


    return 0;
}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 09:34:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/invalid-parameters-during-initialization-Nonlinear-Least-Squares/m-p/1126991#M25325</guid>
      <dc:creator>igor__fedyaev</dc:creator>
      <dc:date>2019-10-22T09:34:45Z</dc:date>
    </item>
    <item>
      <title>Igor, which version of mkl do</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/invalid-parameters-during-initialization-Nonlinear-Least-Squares/m-p/1126992#M25326</link>
      <description>&lt;P&gt;Igor, which version of mkl do you use?&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 07:55:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/invalid-parameters-during-initialization-Nonlinear-Least-Squares/m-p/1126992#M25326</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-10-26T07:55:20Z</dc:date>
    </item>
    <item>
      <title>I am checking with the latest</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/invalid-parameters-during-initialization-Nonlinear-Least-Squares/m-p/1126993#M25327</link>
      <description>&lt;P&gt;I am checking with the latest 2019.5 version of mkl and see&amp;nbsp;&lt;/P&gt;&lt;P&gt;size fjac = 10&lt;BR /&gt;n = 2&lt;BR /&gt;m = 5&lt;BR /&gt;size fvec = 5&lt;BR /&gt;size x = 2&lt;BR /&gt;YES&lt;BR /&gt;&lt;STRONG&gt;res, strnlsp_init = 1501&lt;/STRONG&gt;&lt;BR /&gt;info:&lt;BR /&gt;0,0,0,0,4095,2,&lt;BR /&gt;Major version: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2019&lt;BR /&gt;Minor version: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;Update version: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;BR /&gt;Product status: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Product&lt;BR /&gt;Build: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20190808&lt;BR /&gt;Platform: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Intel(R) 64 architecture&lt;BR /&gt;Processor optimization: &amp;nbsp;Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2) enabled processors&lt;BR /&gt;================================================================&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 08:09:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/invalid-parameters-during-initialization-Nonlinear-Least-Squares/m-p/1126993#M25327</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-10-26T08:09:22Z</dc:date>
    </item>
    <item>
      <title>Gennady, i use mkl 2019.5 .</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/invalid-parameters-during-initialization-Nonlinear-Least-Squares/m-p/1126994#M25328</link>
      <description>&lt;P&gt;Gennady, i use mkl 2019.5 .&lt;/P&gt;&lt;P&gt;This is not a MKL issue. I compiled from under QtCreator. That was the problem. And the program was collected and started. And what is the strangest thing, the INFO parameter was 0,0,0,0,0,0. =)&lt;BR /&gt;Thanks for the answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 08:27:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/invalid-parameters-during-initialization-Nonlinear-Least-Squares/m-p/1126994#M25328</guid>
      <dc:creator>igor__fedyaev</dc:creator>
      <dc:date>2019-10-26T08:27:45Z</dc:date>
    </item>
    <item>
      <title>thanks the update</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/invalid-parameters-during-initialization-Nonlinear-Least-Squares/m-p/1126995#M25329</link>
      <description>&lt;P&gt;thanks the update&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 08:35:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/invalid-parameters-during-initialization-Nonlinear-Least-Squares/m-p/1126995#M25329</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-10-26T08:35:06Z</dc:date>
    </item>
  </channel>
</rss>

