views:

86

answers:

2

I ran ldd command on an executable created by Open MPI. It shows a reference to libpthread.so Using LD_PRELOAD variable I created my own implementation of pthread_create, but from the it output it seems that MPI implementation is not calling pthread_create as I had expected. Why does ldd show pthread so file in output if it is not being used? does Open MPI not use a separate MPI thread for every node to implement the functionality?

A: 

If the binary is not linked with --as-needed then it will acquire a reference to every library given on the link command line, regardless of whether it is actually needed. Pass -Wl,--as-needed to gcc in order to have it pass the option to ld.

Ignacio Vazquez-Abrams
+1  A: 

MPI uses processes, not threads. So no, Open MPI will not use a separate MPI thread per node.

janneb