static compilation question

static compilation question

Hi,

I have a code written in c++ which uses pthreads. I have managed to generate a program version which uses shared libs and which has succesfully ran on XEON Phi (I have seen 100 threads running on the MIC). I am in the process of convincing icc/icpc to compile without errors a static version of the same program to reduce the overhead generated by the shared lib function calls.

I wonder what happens with the libs which were not compiled with icc and definitely not for MIC architecture. I mean what happens when pthreads functions are called from a program which runs on MIC? Do I have to recompile pthreads for the MIC architecture?

Thanks,

Dragos

6 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem de Frances Roth (Intel)

You used icc to compiler your shared libs version of pThreads?

imagem de Frances Roth (Intel)

And I should have actually answered the question the first time. You might want to try compiling your libraries with /usr/linux-k1om-4.7/bin/x86_64-k1om-linux-g++ on the host which will produce code for the coprocessor. Code compiled for the host will not work.

No. All, I did was to compile the program for the MIC arhitecture and I tested it.

Now that I am writing back I started to ask myself if 'icc -mmic' used the libs present on the MIC OS.

Thanks,

Dragos

Citação:

Frances Roth (Intel) escreveu:

You used icc to compiler your shared libs version of pThreads?

imagem de Frances Roth (Intel)

And the quick answer to that is - yes. When you compile using -mmic, it links against the versions of the libraries that were compiled for the coprocessor. It is reading the copies of the libraries it finds on the host but they are specifically compiled for the coprocessor. When it runs, if those were shared libraries, it links against those same libraries, but using the copies it finds on the coprocessor.

Yes, I can confirm that all my libs and the application use the MIC libs. I applogize for generating confussion.

Thanks,

Dragos

Citação:

Frances Roth (Intel) escreveu:

And I should have actually answered the question the first time. You might want to try compiling your libraries with /usr/linux-k1om-4.7/bin/x86_64-k1om-linux-g++ on the host which will produce code for the coprocessor. Code compiled for the host will not work.

Faça login para deixar um comentário.