Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7287 讨论

Iterative Sparse Multiple RHS Solver (dcgmrhs) using with C

recage
初学者
1,934 次查看
There seems to be an inconsistency in the docs for calling 'dcgmrhs_init' from C: the PDF documentation specifies the parameter 'method' in the function call. However, this parameter does not appear in the C header file.

PDF docs: dcgmrhs_init(n, x, nrhs, b, method, RCI_request, ipar, dpar, tmp)

C header: extern void dcgmrhs_init(MKL_INT *n, double *x, MKL_INT* nRhs, double *b, MKL_INT *rci_request, MKL_INT *ipar, double *dpar, double *tmp);

I understand that 'method' doesn't have any influence on the code, since block CG solution is not yet supported.

Is there a demo code available for 'dcgmrhs' written in C? I can only find the code for Fortran.
For some reason the routine 'dcgmrhs_init' crashes on me. Some demo code would be helpful.

Best regards, Recage
0 项奖励
1 解答
Alexander_K_Intel2
1,934 次查看
Quoting - recage
Hi Alexander,
thanks for the speedy reply.
Can you please elaborate a little more on this? Apart from the little inconsistency within the documentation for the function 'dcgmrhs_init', is this function callable? In my code it crashes invariably.
Is there a workaround available for the current situation?

Best regards, Recage
Recage,
It's seems that problem is not in documentation, problem is in header file. Parameter "method" not used in that version of cgmrs, but it need to be in interface. Try to change interface on
dcgmrhs_init(MKL_INT *n, double *x, MKL_INT* nRhs, double *b,MKL_INT *method,MKL_INT *rci_request, MKL_INT *ipar, double *dpar, double *tmp);
With best regards,
Alexander Kalinkin

在原帖中查看解决方案

0 项奖励
5 回复数
Alexander_K_Intel2
1,934 次查看
Quoting - recage
There seems to be an inconsistency in the docs for calling 'dcgmrhs_init' from C: the PDF documentation specifies the parameter 'method' in the function call. However, this parameter does not appear in the C header file.

PDF docs: dcgmrhs_init(n, x, nrhs, b, method, RCI_request, ipar, dpar, tmp)

C header: extern void dcgmrhs_init(MKL_INT *n, double *x, MKL_INT* nRhs, double *b, MKL_INT *rci_request, MKL_INT *ipar, double *dpar, double *tmp);

I understand that 'method' doesn't have any influence on the code, since block CG solution is not yet supported.

Is there a demo code available for 'dcgmrhs' written in C? I can only find the code for Fortran.
For some reason the routine 'dcgmrhs_init' crashes on me. Some demo code would be helpful.

Best regards, Recage


Hi Recage,
We know this problem that appeared while calling cgmhr routines from c code. Itwill be fixed in one of next versions of MKL.

With best regards,

Alexander Kalinkin

0 项奖励
recage
初学者
1,934 次查看
Hi Alexander,
thanks for the speedy reply.
Can you please elaborate a little more on this? Apart from the little inconsistency within the documentation for the function 'dcgmrhs_init', is this function callable? In my code it crashes invariably.
Is there a workaround available for the current situation?

Best regards, Recage
0 项奖励
Alexander_K_Intel2
1,935 次查看
Quoting - recage
Hi Alexander,
thanks for the speedy reply.
Can you please elaborate a little more on this? Apart from the little inconsistency within the documentation for the function 'dcgmrhs_init', is this function callable? In my code it crashes invariably.
Is there a workaround available for the current situation?

Best regards, Recage
Recage,
It's seems that problem is not in documentation, problem is in header file. Parameter "method" not used in that version of cgmrs, but it need to be in interface. Try to change interface on
dcgmrhs_init(MKL_INT *n, double *x, MKL_INT* nRhs, double *b,MKL_INT *method,MKL_INT *rci_request, MKL_INT *ipar, double *dpar, double *tmp);
With best regards,
Alexander Kalinkin
0 项奖励
recage
初学者
1,934 次查看
Sir, may I call you Jesus?
Changing the header file solved the problem.
Thanks a lot!!
0 项奖励
Alexander_K_Intel2
1,934 次查看
Quoting - recage
Sir, may I call you Jesus?
Changing the header file solved the problem.
Thanks a lot!!
Recage,
Thanks for the good words, you are welcome :)
With best regards,
Alexander Kalinkin
0 项奖励
回复