- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to using the MKL routine in a code.
In fact i'm interested in evaluating the gradient of a certain function.
Previously, when i had at disposal the IMSL libraries, i used the IMSL function CDGRD.
Now i need to use the MKL. As i understand there is not a similar function in the MKL library, but the gradient can be obtained by using the MKL routine evaluating the jacobian of a one value function.
Regarding this point i haven't understand which function i have to use between djacobi_solve and djacobi.
I tried to use both by following the examples reported in the manual.
1)Djacobi :
Iused the following command:
res=djacobi(FCN_2,1,NUNK,gnew(1:NUNK),xnB(1:NUNK),epsjac)
where FCN_2 is the external function having one value anddepending on NUNK variables
gnew is the gradient
xnB is the vector containing the variables at the current stage
epsjac is the precision
I did not get the same results as with the function CDGRD.I get a very big number for the first components and zero for the other gradient components, while the res is a very big negative number.
2) DJACOBI_SOLVE
I tried to compile the example shown at http://www.intel.com/software/products/mkl/docs/WebHelp/osr/osr_djacobi_solve_example.html
Unfortunately I cannot find the mkl_opt_tr.f, so i removed the "include" line.
ThenI get some error messages saying that it does not recognize the djacobi_init, djacobi_solve and so on.So i suppose i do not link correctly to the MKL libraries.
HELP AND SUGGESTIONS???
Thanks
C.
In fact i'm interested in evaluating the gradient of a certain function.
Previously, when i had at disposal the IMSL libraries, i used the IMSL function CDGRD.
Now i need to use the MKL. As i understand there is not a similar function in the MKL library, but the gradient can be obtained by using the MKL routine evaluating the jacobian of a one value function.
Regarding this point i haven't understand which function i have to use between djacobi_solve and djacobi.
I tried to use both by following the examples reported in the manual.
1)Djacobi :
Iused the following command:
res=djacobi(FCN_2,1,NUNK,gnew(1:NUNK),xnB(1:NUNK),epsjac)
where FCN_2 is the external function having one value anddepending on NUNK variables
gnew is the gradient
xnB is the vector containing the variables at the current stage
epsjac is the precision
I did not get the same results as with the function CDGRD.I get a very big number for the first components and zero for the other gradient components, while the res is a very big negative number.
2) DJACOBI_SOLVE
I tried to compile the example shown at http://www.intel.com/software/products/mkl/docs/WebHelp/osr/osr_djacobi_solve_example.html
Unfortunately I cannot find the mkl_opt_tr.f, so i removed the "include" line.
ThenI get some error messages saying that it does not recognize the djacobi_init, djacobi_solve and so on.So i suppose i do not link correctly to the MKL libraries.
HELP AND SUGGESTIONS???
Thanks
C.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could try postingyour questionto the Intel Math Kernel Library forum.
Les
Les

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page