Closed mohit9638iitk closed 2 years ago
There are two possible solutions AFAIK:
libmy_mpi.so
and use the LD_PRELOAD trick.-D MPI_Sendrecv=MPI_Sendrecv_custom
and ensure to have the MPI_Sendrecv_custom()
symbol in your libmy_mpi.a
Thanks @hominhquan ,it has helped me a lot.
I want to overload the MPI_Sendrecv() function of fftw. I have one header file named as "lib.h" and code in file named as "lib.c".
For simple example (say mpi_3d_fftw3.cpp) I do command line compilation ;-
So, basically mpi_3d_fftw.cpp will call fftw_execute and internally it uses MPI_Sendrecv() for communication purpose. By compiling with lib.o executable, fftw uses my version of MPI_Sendrecv().
I want to know how to link my library with fftw so that I do not have to compile with my executable for every code.
Please help me in doing this thing.