- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
A sample program:
program quest
#ifdef _VEM_OMP
use omp_lib
#endif
#ifdef _VEM_OMP
write(*,*) "num procs:", omp_get_num_procs()
#endif
write(*,*) "Finished"
end
Compile & link with:
>ifort -fpp -D_VEM_OMP -openmp-link static quest.f90 -o quest -L/opt/intel/Compiler/11.0/081/lib/intel64 -liomp5
run with:
>./quest
Response:
>./quest: error while loading shared libraries:libiomp5.so: cannot open shared object file: No such file
Question: Why is it trying to find and load a dynamic lib when I told it to do a static link?
- Marcas:
- Intel® Fortran Compiler
Link copiado
2 Respostas
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Because you inadvertently specified the dynamic library by putting the -liomp5 option in the command line. By default the linker first searches for the shared variant of any libraries that you specify. You need -Bstatic before that -l option if you want the linker to search for the static variant.
But why do you have that -l option, or the -L option there at all? The compiler driver manages that sort of stuff for you.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
There is no longer a static version of the OpenMP library, so the compiler will always use the dynamic OpenMP library when you use OpenMP. This is the case even if you compile you specify static.
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