- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

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