Commit e0fc3996 authored by PRUVOST Florent's avatar PRUVOST Florent

update doc texinfo using chapter about dynamic linking

parent 476b0a64
...@@ -170,18 +170,22 @@ gcc main.o -o main \ ...@@ -170,18 +170,22 @@ gcc main.o -o main \
-lstarpu-1.1 -Wl,--no-as-needed -lmkl_intel_lp64 \ -lstarpu-1.1 -Wl,--no-as-needed -lmkl_intel_lp64 \
-lmkl_sequential -lmkl_core -lpthread -lm -lrt -lmkl_sequential -lmkl_core -lpthread -lm -lrt
@end example @end example
As you can see in this example, we also link with dynamic libraries As you can see in this example, we also link with some dynamic libraries
@option{starpu-1.1}, @option{Intel MKL} @option{starpu-1.1}, @option{Intel MKL} libraries (for
libraries (for BLAS/LAPACK/CBLAS/LAPACKE), @option{pthread}, @option{m} (math) BLAS/LAPACK/CBLAS/LAPACKE), @option{pthread}, @option{m} (math) and
and @option{rt}. @option{rt}.
These libraries will depend on the configuration of your CHAMELEON build. These libraries will depend on the configuration of your CHAMELEON build.
You can find these dependencies in .pc files we generate during compilation and You can find these dependencies in .pc files we generate during compilation and
that are installed in the sub-directory @file{lib/pkgconfig} of your that are installed in the sub-directory @file{lib/pkgconfig} of your
CHAMELEON install directory. CHAMELEON install directory.
Note also that you could need to specify where to find these libraries with Note also that you could need to specify where to find these libraries with
@option{-L} option of your compiler/linker. @option{-L} option of your compiler/linker.
Before to run your program, make sure that all dynamic libraries path are
appended in the @env{LD_LIBRARY_PATH} (for Linux systems) environment variable Before to run your program, make sure that all shared libraries paths your
executable depends on are known.
Enter @code{ldd main} to check.
If some shared libraries paths are missing append them in the
@env{LD_LIBRARY_PATH} (for Linux systems) environment variable
(@env{DYLD_LIBRARY_PATH} on Mac, @env{LIB} on Windows). (@env{DYLD_LIBRARY_PATH} on Mac, @env{LIB} on Windows).
@node Dynamic linking in C @node Dynamic linking in C
...@@ -199,9 +203,10 @@ gcc main.o -o main \ ...@@ -199,9 +203,10 @@ gcc main.o -o main \
-lstarpu-1.1 -Wl,--no-as-needed -lmkl_intel_lp64 \ -lstarpu-1.1 -Wl,--no-as-needed -lmkl_intel_lp64 \
-lmkl_sequential -lmkl_core -lpthread -lm -lrt -lmkl_sequential -lmkl_core -lpthread -lm -lrt
@end example @end example
Note that an update of your environment variable Note that an update of your environment variable
@env{LD_LIBRARY_PATH} (@env{DYLD_LIBRARY_PATH} on Mac, @env{LIB} on Windows) @env{LD_LIBRARY_PATH} (@env{DYLD_LIBRARY_PATH} on Mac, @env{LIB} on Windows)
with the path of the libraries is required before executing, example: with the path of the libraries could be required before executing, example:
@example @example
export @env{LD_LIBRARY_PATH}=path/to/libs:path/to/chameleon/lib export @env{LD_LIBRARY_PATH}=path/to/libs:path/to/chameleon/lib
@end example @end example
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment