- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I have (inherited) a code that is written with C++ (mainly), Fortran and MPI (with some scalapack calls too). We have just upgraded to Intel 2019 compilers (linux cluster).
My CMake file has the flags
set(CMAKE_C_FLAGS_INIT -static-libgcc -lstdc++)
set(CMAKE_CXX_FLAGS_INIT -static-libgcc -ansi -lstdc++)
set(CMAKE_CXX_FLAGS "-static-libstdc++ -static-libgcc -static -mkl=cluster -static-intel -ansi -qopenmp -fp-model precise -fp-model source")
and runs as expected (i.e., successfully finds the Intel 2019 MKL, MPI libraries etc).
However, when I run "make", I get the following error
/opt/intel/composer_2019/compilers_and_libraries_2019.3.199/linux/mkl/include/mkl_scalapack.h(3516): error: more than one instance of overloaded function "descinit_" has "C" linkage
void descinit_(MKL_INT* desc, const MKL_INT* m, const MKL_INT* n,
which appears to be a problem with linking to MKL.
Does anyone know what the problem could be?
Thanks in advance.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
G.D. wrote:
/opt/intel/composer_2019/compilers_and_libraries_2019.3.199/linux/mkl/include/mkl_scalapack.h(3516): error: more than one instance of overloaded function "descinit_" has "C" linkage
void descinit_(MKL_INT* desc, const MKL_INT* m, const MKL_INT* n,which appears to be a problem with linking to MKL.
No, this is not a linking problem. Rather, the compiler found more than one prototype declaration for the external routine descinit_ in the header file mkl_scalapack.h. You can do grep -in descinit mkl_scalapack.h in the MKL include directory to have the offending lines displayed. You may likewise see if this header file is mistakenly included more than once, directly or indirectly, in your source file(s).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks mecej4.
Yes indeed the code (which is new to me) had some include files that had "extern c" declarations to lapack subroutines. Simply commenting those lines solved the issue. In this case, the error message was actually quite descriptive and accurate! Thanks.

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