unresolved external symbols: numroc_ & descinit_

unresolved external symbols: numroc_ & descinit_

Hi,

How can I call the functions numroc_ and descinit_  in c + +. I just read a similar posts but still do not know how to link these two functions.

Thanks,

Stan

4 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

Those look like Fortran functions compiled according to the most common default for linux, MAC, BSD (but not Windows). A direct call from C++ would use those function names literally with extern "C" qualifier, and of course parameters by reference.
For choice of corresponding MKL libraries, if -mkl isn't what you want, you would use the MKL link advisor (if it is active today).

Hi TimP,
I tried to directly call in c + + but never failed:

#ifdef __cplusplus
extern "C" {
#endif
void Cblacs_pinfo(int* mypnum, int* nprocs); // OK
void Cigebs2d(int icontxt, char *scope, char *top, int m, int n, int *A, int lda); //OK
void descinit_(int *idescal, int *m, int *n,int *mb,int *nb, int *dummy1 , int *dummy2 , int *icon, int *mla, int *info); //error: unresolved external symbols
int numroc_(int *n, int *nb, int *iproc, int *isrcprocs, int *nprocs); //error: unresolved external symbols
#ifdef __cplusplus
}
#endif
#define dgesd2d_ DGESD2D //OK

the same:
#define numroc_ NUMROC //error: unresolved external symbols

Now wrapped it in pure c and is OK.

Regards
Stan

Hello, I'm having a similar problem here.

I've recently aquired Composure XE 2013 with MKL and tried to run the example programs for pblasc but have been unable.  When looking into the problem I think it is because these basic functions, numroc_ and descinit_, don't seem to be in the include files.  Since numroc_ and descinit_ are not in the include files in any form, should I simply add them to mkl_pblas.h with the above data types as inputs and just hope they are in the libraries and give the right output?

Thanks,

-Gabe

发表评论

登录添加评论。还不是成员?立即加入