Skip to content

Commit

Permalink
Document Darwin's dynamic preload environment variable DYLD_INSERT_LI…
Browse files Browse the repository at this point in the history
…BRARIES.
  • Loading branch information
theurich committed Oct 23, 2023
1 parent 29a503b commit 6aff723
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Infrastructure/Trace/doc/Trace_usage.tex
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,13 @@ \subsubsection{Include MPI Communication in the Profile}
Note that for either option, ESMF must be built with {\tt ESMF\_TRACE\_BUILD\_LIB=ON},
which is the default.

In {\em dynamically linked applications}, the {\tt LD\_PRELOAD} environment variable
must be used when executing the MPI application. This instructs the dynamic
linker to interpose certain MPI symbols so they can be captured by the ESMF
profiler. To simplify this process, a script is provided at
{\tt \$(ESMF\_INSTALL\_LIBDIR)/preload.sh} that sets the {\tt LD\_PRELOAD} variable.
In {\em dynamically linked applications}, the {\tt LD\_PRELOAD} (Linux) or
{\tt DYLD\_INSERT\_LIBRARIES} (Darwin) environment variable must be used when
executing the MPI application. This instructs the dynamic loader to interpose
certain MPI symbols so they can be captured by the ESMF profiler. To simplify
this process, a script is provided at {\tt \$(ESMF\_INSTALL\_LIBDIR)/preload.sh}
that sets the appropriate variable.

For example, if you typically execute your application as as follows:

\begin{verbatim}
Expand Down

0 comments on commit 6aff723

Please sign in to comment.