Commit 9513feca authored by THIBAULT Samuel's avatar THIBAULT Samuel
Browse files

Rather use simu.sh / native.sh

parent f47c4246
Pipeline #217457 passed with stages
in 1 minute and 31 seconds
...@@ -225,12 +225,12 @@ $ guix environment --pure starpu-simgrid --ad-hoc starpu-simgrid grep coreutils ...@@ -225,12 +225,12 @@ $ guix environment --pure starpu-simgrid --ad-hoc starpu-simgrid grep coreutils
</pre></tt> </pre></tt>
<p> <p>
You also need to load the environment from the <tt>init.sh</tt> shell script You also need to load the environment from the <tt>simu.sh</tt> shell script
from the <a href="./starpu_files.tgz"><tt>archive file</tt></a>. from the <a href="./starpu_files.tgz"><tt>archive file</tt></a>.
</p> </p>
<tt><pre> <tt><pre>
. ./init.sh . ./simu.sh
</pre></tt> </pre></tt>
--> -->
...@@ -329,12 +329,12 @@ tarball: ...@@ -329,12 +329,12 @@ tarball:
<h4>Computation Kernels</h4> <h4>Computation Kernels</h4>
<p> <p>
Examine the source code, starting from <tt>vector_scal_cpu.c</tt> : this is Examine the source code, starting from <tt>vector_scal_cpu.c</tt> : this is
the same <tt>vector_scal_cpu</tt>computation code, which was wrapped into a <tt>vector_scal_cpu</tt> the same <tt>vector_scal_cpu</tt> computation code, which was wrapped into a <tt>vector_scal_cpu</tt>
function which takes a series of DSM interfaces and a non-DSM parameter function which takes a series of DSM interfaces and a non-DSM parameter
<tt> <tt>
<pre> <pre>
void vector_scal_cpu(void *buffers[], void *cl_arg) void vector_scal_cpu(void *buffers[], void *cl_arg) {
</pre> </pre>
</tt> </tt>
</p> </p>
...@@ -529,7 +529,7 @@ version of StarPU by setting some environment variables by running in your ...@@ -529,7 +529,7 @@ version of StarPU by setting some environment variables by running in your
shell: shell:
<tt> <tt>
<pre> <pre>
. ./init.sh . ./simu.sh
</pre> </pre>
</tt> </tt>
</p> </p>
...@@ -539,7 +539,15 @@ If you ever want to get back to the non-simulated version of StarPU, you can run ...@@ -539,7 +539,15 @@ If you ever want to get back to the non-simulated version of StarPU, you can run
in your shell: in your shell:
<tt> <tt>
<pre> <pre>
. ./deinit.sh . ./native.sh
</pre>
</tt>
Note that after switching between the simulated and the non-simulated versions
of StarPU, you have to rebuild completely:
<tt>
<pre>
make clean
make
</pre> </pre>
</tt> </tt>
</p> </p>
...@@ -666,7 +674,9 @@ units. ...@@ -666,7 +674,9 @@ units.
matrix-matrix product example, but which makes use of BLAS kernels for matrix-matrix product example, but which makes use of BLAS kernels for
much better performance. The <tt>mult_kernel_common</tt> functions much better performance. The <tt>mult_kernel_common</tt> functions
shows how we call <tt>DGEMM</tt> (CPUs) or <tt>cublasDgemm</tt> (GPUs) shows how we call <tt>DGEMM</tt> (CPUs) or <tt>cublasDgemm</tt> (GPUs)
on the DSM interface. on the DSM interface. Also note the presence of the
<tt>starpu_cublas_init()</tt> call in the main function so as to more
efficiently connect cublas with StarPU.
</p> </p>
<p> <p>
...@@ -833,7 +843,7 @@ Simgrid version of StarPU. You can run ...@@ -833,7 +843,7 @@ Simgrid version of StarPU. You can run
<tt> <tt>
<pre> <pre>
. ./init.sh . ./simu.sh
</pre> </pre>
</tt> </tt>
...@@ -924,8 +934,8 @@ We have also measured the performance of the <tt>mult</tt> kernel example, which ...@@ -924,8 +934,8 @@ We have also measured the performance of the <tt>mult</tt> kernel example, which
drawn with drawn with
<tt><pre> <tt><pre>
starpu_perfmodel_plot -s mult_perf_model starpu_perfmodel_plot -s mult_perf_model
gnuplot starpu_mult_perf_model.conan.gp gnuplot starpu_mult_perf_model.gp
gv starpu_mult_perf_model.conan.eps gv starpu_mult_perf_model.eps
</pre></tt> </pre></tt>
<center><img src=starpu_mult_perf_model.png></center> <center><img src=starpu_mult_perf_model.png></center>
We can see a slight bump after 2MB. We can see a slight bump after 2MB.
...@@ -949,6 +959,7 @@ We can also draw the energy used by tasks: ...@@ -949,6 +959,7 @@ We can also draw the energy used by tasks:
<tt><pre> <tt><pre>
starpu_perfmodel_plot -e -s mult_energy_model starpu_perfmodel_plot -e -s mult_energy_model
gnuplot starpu_mult_energy_model.gp gnuplot starpu_mult_energy_model.gp
gv starpu_mult_energy_model.eps
</pre></tt> </pre></tt>
<center><img src=starpu_mult_energy_model.png></center> <center><img src=starpu_mult_energy_model.png></center>
We can again notice the bump after 2MB. We can again notice the bump after 2MB.
...@@ -983,7 +994,7 @@ non-simgrid version of StarPU: ...@@ -983,7 +994,7 @@ non-simgrid version of StarPU:
</p> </p>
<tt> <tt>
<pre> <pre>
. ./deinit.sh . ./native.sh
</pre> </pre>
</tt> </tt>
...@@ -1065,6 +1076,18 @@ decision in advance according to performance models, and issue data prefetch ...@@ -1065,6 +1076,18 @@ decision in advance according to performance models, and issue data prefetch
requests, to overlap data transfers and computations. requests, to overlap data transfers and computations.
</p> </p>
<p>
To observe the scheduling between CPUs and GPUs, let us switch back to
simulation:
<tt>
<pre>
. ./simu.sh
make clean
make
</pre>
</tt>
</p>
<p> <p>
For instance, compare the <tt>lws</tt> (default) and <tt>dmda</tt> scheduling For instance, compare the <tt>lws</tt> (default) and <tt>dmda</tt> scheduling
policies: policies:
...@@ -1072,7 +1095,7 @@ policies: ...@@ -1072,7 +1095,7 @@ policies:
<tt> <tt>
<pre> <pre>
STARPU_BUS_STATS=1 STARPU_WORKER_STATS=1 gemm/sgemm -xy $((256*4)) -nblocks 4 STARPU_BUS_STATS=1 STARPU_WORKER_STATS=1 STARPU_SCHED=lws gemm/sgemm -xy $((256*4)) -nblocks 4
</pre> </pre>
</tt> </tt>
...@@ -1123,7 +1146,9 @@ data dependencies. ...@@ -1123,7 +1146,9 @@ data dependencies.
<p> <p>
We will here have to use the non-simulated version of StarPU, so you have to run We will here have to use the non-simulated version of StarPU, so you have to run
<tt><pre> <tt><pre>
. ./deinit.sh . ./native.sh
make clean
make
</pre></tt> </pre></tt>
</p> </p>
......
unset PKG_CONFIG_PATH
unset STARPU_HOSTNAME
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