1. Using DYLD_LIBRARY_PATH2. passing some ./configure --with-wrapper-ldflags="-L/opt/openmpi/lib"3. passing some ./configure --with-wrapper-ldflags="-rpath /opt/openmpi/lib"4. hand compilation with cc -L/opt/openmpi/lib -lmpi2 and 3 did not work (ld error=22)With 1 and 2 my code still gets linked with /usr/lib/libmpi...Note, that the /opt/openmpi/bin path is properly set and ompi_info does outputs the right info.