Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 07cb80b1 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

comment fortran linking part

parent ed9fd28c
No related branches found
No related tags found
No related merge requests found
...@@ -75,39 +75,39 @@ ...@@ -75,39 +75,39 @@
export LD_LIBRARY_PATH=path/to/libs:path/to/chameleon/lib export LD_LIBRARY_PATH=path/to/libs:path/to/chameleon/lib
#+end_src #+end_src
*** Build a Fortran program with Chameleon :noexport: # *** Build a Fortran program with Chameleon :noexport:
#
Chameleon provides a Fortran interface to user functions. Example: # Chameleon provides a Fortran interface to user functions. Example:
#+begin_src # #+begin_src
call morse_version(major, minor, patch) !or # call morse_version(major, minor, patch) !or
call MORSE_VERSION(major, minor, patch) # call MORSE_VERSION(major, minor, patch)
#+end_src # #+end_src
#
Build and link are very similar to the C case. # Build and link are very similar to the C case.
#
Compilation example: # Compilation example:
#+begin_src # #+begin_src
gfortran -o main.o -c main.f90 # gfortran -o main.o -c main.f90
#+end_src # #+end_src
#
Static linking example: # Static linking example:
#+begin_src # #+begin_src
gfortran main.o -o main \ # gfortran main.o -o main \
/home/yourname/install/chameleon/lib/libchameleon.a \ # /home/yourname/install/chameleon/lib/libchameleon.a \
/home/yourname/install/chameleon/lib/libchameleon_starpu.a \ # /home/yourname/install/chameleon/lib/libchameleon_starpu.a \
/home/yourname/install/chameleon/lib/libcoreblas.a \ # /home/yourname/install/chameleon/lib/libcoreblas.a \
-lstarpu-1.2 -Wl,--no-as-needed -lmkl_intel_lp64 \ # -lstarpu-1.2 -Wl,--no-as-needed -lmkl_intel_lp64 \
-lmkl_sequential -lmkl_core -lpthread -lm -lrt # -lmkl_sequential -lmkl_core -lpthread -lm -lrt
#+end_src # #+end_src
#
Dynamic linking example: # Dynamic linking example:
#+begin_src # #+begin_src
gfortran main.o -o main \ # gfortran main.o -o main \
-L/home/yourname/install/chameleon/lib \ # -L/home/yourname/install/chameleon/lib \
-lchameleon -lchameleon_starpu -lcoreblas \ # -lchameleon -lchameleon_starpu -lcoreblas \
-lstarpu-1.2 -Wl,--no-as-needed -lmkl_intel_lp64 \ # -lstarpu-1.2 -Wl,--no-as-needed -lmkl_intel_lp64 \
-lmkl_sequential -lmkl_core -lpthread -lm -lrt # -lmkl_sequential -lmkl_core -lpthread -lm -lrt
#+end_src # #+end_src
** Using Chameleon executables ** Using Chameleon executables
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment