- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hi all:
I downloaded the trial versions for both ifc and mkl. I'm trying to compile but it looks like there is something missing in my environment or i did not link the right libraries. I can't figure out what's wrong, especially since i'm not looking to turn on openMP. It looks like that:
myutil.so: undefined reference to `__kmpc_for_static_fini'
myutil.so: undefined reference to `omp_in_parallel_'
myutil.so: undefined reference to `__kmpc_end_serialized_parallel'
myutil.so: undefined reference to `omp_get_max_threads_'
myutil.so: undefined reference to `getarg_'
myutil.so: undefined reference to `__kmpc_for_static_init_4'
myutil.so: undefined reference to `kmp_set_stacksize_'
myutil.so: undefined reference to `iargc_'
myutil.so: undefined reference to `__kmpc_serialized_parallel'
myutil.so: undefined reference to `__kmpc_fork_call'
myutil.so: undefined reference to `__kmpc_global_thread_num'
myutil.so: undefined reference to `__kmpc_ok_to_fork'
Any help is greatly appreciated.
Cheers,
Philippe
I downloaded the trial versions for both ifc and mkl. I'm trying to compile but it looks like there is something missing in my environment or i did not link the right libraries. I can't figure out what's wrong, especially since i'm not looking to turn on openMP. It looks like that:
myutil.so: undefined reference to `__kmpc_for_static_fini'
myutil.so: undefined reference to `omp_in_parallel_'
myutil.so: undefined reference to `__kmpc_end_serialized_parallel'
myutil.so: undefined reference to `omp_get_max_threads_'
myutil.so: undefined reference to `getarg_'
myutil.so: undefined reference to `__kmpc_for_static_init_4'
myutil.so: undefined reference to `kmp_set_stacksize_'
myutil.so: undefined reference to `iargc_'
myutil.so: undefined reference to `__kmpc_serialized_parallel'
myutil.so: undefined reference to `__kmpc_fork_call'
myutil.so: undefined reference to `__kmpc_global_thread_num'
myutil.so: undefined reference to `__kmpc_ok_to_fork'
Any help is greatly appreciated.
Cheers,
Philippe
- Marcas:
- Intel® Fortran Compiler
Link copiado
10 Respostas
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
What compile and link commands did you use?
Steve
Steve
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I used
ifc -O2 -tpp7 -unroll -axW -ipo -ipo_obj
along with -Vaxlib -lCEPCF90
myutil.so was linked to mkl_p4.a and mkl_lapack.a
Philippe
ifc -O2 -tpp7 -unroll -axW -ipo -ipo_obj
along with -Vaxlib -lCEPCF90
myutil.so was linked to mkl_p4.a and mkl_lapack.a
Philippe
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I think MKL may want the OpenMP libraries - I'm not up to speed on that yet. Perhaps someone else will comment.
Steve
Steve
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Yes, MKL would require the openmp support. That should be in the MKL notes. The supported way would be to use ifc -openmp (together with your other options) to link.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thanks to y'all.
Adding -openmp -lpthread did the trick. I finally got my executables. I just need to understand why i get garbage out of them when i use MKL as opposed to plain BLAS....
I hope it's not due to something silly like case-sensitivity for uplo and such;-)
Cheers,
Philippe
Adding -openmp -lpthread did the trick. I finally got my executables. I just need to understand why i get garbage out of them when i use MKL as opposed to plain BLAS....
I hope it's not due to something silly like case-sensitivity for uplo and such;-)
Cheers,
Philippe
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Just a warning - if you specify -openmp on the compile line, the default for array storage changes from static to automatic (local). This can break programs that are expecting array data to be saved from one call to another.
You can avoid this if necessary by linking to the openmp libraries explicitly (libguide followed by libpthread) and omitting -openmp
Martyn
You can avoid this if necessary by linking to the openmp libraries explicitly (libguide followed by libpthread) and omitting -openmp
Martyn
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Quoting - Martyn Corden (Intel)
Just a warning - if you specify -openmp on the compile line, the default for array storage changes from static to automatic (local). This can break programs that are expecting array data to be saved from one call to another.
You can avoid this if necessary by linking to the openmp libraries explicitly (libguide followed by libpthread) and omitting -openmp
Martyn
You can avoid this if necessary by linking to the openmp libraries explicitly (libguide followed by libpthread) and omitting -openmp
Martyn
Wouldn't a -save do the same? This is more out of curiosity than a hint, but from the ifort doc this seems to be the case. Also ifort tells me
ifort: warning #10247: explicit static allocation of locals specified, overriding OpenMP*'s implicit auto allocation
regards,
mike
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Quoting - mike-s
Wouldn't a -save do the same? This is more out of curiosity than a hint, but from the ifort doc this seems to be the case. Also ifort tells me
ifort: warning #10247: explicit static allocation of locals specified, overriding OpenMP*'s implicit auto allocation
regards,
mike
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Quoting - Martyn Corden (Intel)
Just a warning - if you specify -openmp on the compile line, the default for array storage changes from static to automatic (local). This can break programs that are expecting array data to be saved from one call to another.
You can avoid this if necessary by linking to the openmp libraries explicitly (libguide followed by libpthread) and omitting -openmp
Martyn
You can avoid this if necessary by linking to the openmp libraries explicitly (libguide followed by libpthread) and omitting -openmp
Martyn
Hi,
I had a case recently where someone had built an OpenMP code by linking in the libguide and libthread libraries explicitly instead of using -openmp. This caused a problem in a part of the code that had used OpenMP sections to open and read several input files in parallel. So I suspected, but never found out,if using -openmp also loaded in some thread-safe versions of other standard libraries.
How does one find out what is going on under the covers, at link time, when -openmp is specified?
regards
Mike
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
You could add -# to your ifort command so as to see details of the linker script. There's a problem if you link an OpenMP library from an old version of MKL which conflicts with the one you need for a newer ifort. The integrated ifort Professional (all 11.x versions) should avoid such problems, as long as you use the MKL which comes with ifort. All standard libraries should be thread-safe, as long as you don't use discontinued Windows environments.

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