Showing results for 
Search instead for 
Did you mean: 

Nonlinear least square solver problem

Hi, Ill appreciate your help on this.

Testing the demo constraints file ex_nlsqp_bc_c.c provided with the evaluation MKL (Ver 10.3 update 7), I cannot get a realistic answer; it appears the solver is notconverging (see below values over 1E200).

Ive tried to build my own target functions instead of the extendet_powel with unsuccessful results. I tested the MKL installation using a matrix multiplication and works fine.

I wonder if I am using the correct compiler and libraries settings. Attached is the MSVS 2008 project Im using.

Has anyone at Intel tested the ex_nlsqp_bc_c.c file using the latest MKL Ver 10.3 update 7 ?

Thank you in advance,



Ive to change the original file line 140 from handle to &handle:

ex_nlsqp_bc_c.cpp(142) : error C2664: 'dtrnlspbc_check' : cannot convert parameter 1 from '_TRNSPBC_HANDLE_t' to '_TRNSPBC_HANDLE_t *'


0 Kudos
4 Replies
Black Belt

On Windows-7-X64, the example builds and runs fine as is, with either the 32-bit or 64-bit Intel compilers, version 12.1, when run at the command line:

s:\> icl /Qmkl ex_nlsqp_bc_c.c

There is a discrepancy between what is in the Zip file that you attached and your description. The example source file is in C, not C++.

Which C compiler did you use?


Hi,I checked also how this test works on my side - all works fine with 32 and 64 bit. Win7.
the same as mecej, I tried Intel Compiler v.12.1 (/Qmkl ) and I compiled by Microsoft compiler ( version 16.0 - MVSC 10.0 ) with expliciltly linking with all needed mkl's libs - and I didn't found the problems.
Black Belt


After looking at the original poster's comments regarding the changes he "had to make" on line-140, I checked by passing different values for the first argument to dtrnlspbc_check, I found something a little odd.

It appears that any non-NULL value will suffice in place of handle. This suggests to me that the only use made of this argument is to test that this is not NULL. Furthermore, the type of this argument is specified as

typedef void* _TRNSPBC_HANDLE_t.

Is this true (that only nullity is tested) and, if so, could more complete checks be made to check the validity of the handle?

Mecej4 / Gennady,

Thank you to point me on the right direction. Now it works beautifully... great help.

I decided to start completely from fresh: new software installation and follow the documentation. Now I can compile using th command line.

As Mecej4 indicated, my original project had inconsistencies, as I was trying multiple things. In addition my environment variables were not completely correct and I didnt have installed the any Intel compiler. My Visual Studio 2008 isusing my oldder Ver 6.0.5724. compiler. Ive to fix this.

Forgive me; Im still green on C\C++.



For referece, this is answer I got: x[0]=0.1 x[1]=-0.00998224 x[2]=0.0428549 x[3]=0.0435653