Add usage example with work-around for programs runtime load libmpi
authorKienan Stewart <kstewart@efficios.com>
Tue, 7 May 2024 19:38:33 +0000 (15:38 -0400)
committerKienan Stewart <kstewart@efficios.com>
Tue, 7 May 2024 19:38:33 +0000 (15:38 -0400)
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
README.md

index 1b509a6515f631c25451e530ba06820725d7d524..3e5d221479174aaae43551f8e414796d56dbb142 100644 (file)
--- a/README.md
+++ b/README.md
@@ -30,6 +30,25 @@ bypass the pkg-config finding of mpi.h.  You can also pass
 The resulting `lttng-ust-mpi.so` can be used to instrument OpenMPI or CrayMPI
 with LTTng.  See the `check` script for usage example.
 
+# Usage
+
+For programs that have a direct dependency on `libmpi.so` (e.g. they are listed
+as NEEDED in the dynamic section of an ELF binary), the following can be used
+to activate tracing:
+
+```
+LD_PRELOAD=liblttng-ust-mpi.so ./program
+```
+
+However, if the the program in question loads `libmpi.so` dynamically during
+execution a work around is required to ensure the library is already. The
+following command can be used as a work-around until a more robust solution
+is put in place:
+
+```
+LD_PRELOAD=liblttng-ust-mpi.so:libmpi.so ./program
+```
+
 # Set of ignored functions
 
 The only function ignored is `MPI_Pcontrol`.  One can extend the `forbiden_list`
This page took 0.023456 seconds and 4 git commands to generate.