- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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 copiado
2 Respostas
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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).
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.

Responder
Opções do tópico
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora