|
@@ -2,19 +2,19 @@
|
|
|
|
|
|
@c This file is part of the StarPU Handbook.
|
|
|
@c Copyright (C) 2009--2011 Universit@'e de Bordeaux 1
|
|
|
-@c Copyright (C) 2010, 2011, 2012 Centre National de la Recherche Scientifique
|
|
|
+@c Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique
|
|
|
@c Copyright (C) 2011 Institut National de Recherche en Informatique et Automatique
|
|
|
@c See the file starpu.texi for copying conditions.
|
|
|
|
|
|
@menu
|
|
|
-* Setting flags for compiling and linking applications::
|
|
|
+* Setting flags for compiling::
|
|
|
* Running a basic StarPU application::
|
|
|
* Kernel threads started by StarPU::
|
|
|
* Enabling OpenCL::
|
|
|
@end menu
|
|
|
|
|
|
-@node Setting flags for compiling and linking applications
|
|
|
-@section Setting flags for compiling and linking applications
|
|
|
+@node Setting flags for compiling
|
|
|
+@section Setting flags for compiling, linking and running applications
|
|
|
|
|
|
Compiling and linking an application against StarPU may require to use
|
|
|
specific flags or libraries (for instance @code{CUDA} or @code{libspe2}).
|
|
@@ -40,9 +40,30 @@ with the @code{libstarpu} package. Similar packages are provided for
|
|
|
% pkg-config --libs starpu-1.0 # options for the linker
|
|
|
@end example
|
|
|
|
|
|
+Make sure that @code{pkg-config --libs starpu-1.0} actually produces some output
|
|
|
+before going further: @code{PKG_CONFIG_PATH} has to point to the place where
|
|
|
+@code{starpu-1.0.pc} was installed during @code{make install}.
|
|
|
+
|
|
|
Also pass the @code{--static} option if the application is to be
|
|
|
linked statically.
|
|
|
|
|
|
+It is also necessary to set the variable @code{LD_LIBRARY_PATH} to
|
|
|
+locate dynamic libraries at runtime.
|
|
|
+
|
|
|
+@example
|
|
|
+% LD_LIBRARY_PATH=$prefix_dir/lib:$LD_LIBRARY_PATH
|
|
|
+@end example
|
|
|
+
|
|
|
+When using a Makefile, the following lines can be added to set the
|
|
|
+options for the compiler and the linker:
|
|
|
+
|
|
|
+@cartouche
|
|
|
+@example
|
|
|
+CFLAGS += $$(pkg-config --cflags starpu-1.0)
|
|
|
+LDFLAGS += $$(pkg-config --libs starpu-1.0)
|
|
|
+@end example
|
|
|
+@end cartouche
|
|
|
+
|
|
|
@node Running a basic StarPU application
|
|
|
@section Running a basic StarPU application
|
|
|
|