From 2d8d830293ac1d161bf05d9f8e6c3c2d058960fb Mon Sep 17 00:00:00 2001 From: degomme Date: Thu, 7 Mar 2019 17:17:20 +0100 Subject: [PATCH] adapt smpi tuto to use pajengr (+ dockerfile) --- docs/source/Tutorial_MPI_Applications.rst | 14 +++++++++++--- tools/docker/Dockerfile.tuto-smpi | 6 ++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/docs/source/Tutorial_MPI_Applications.rst b/docs/source/Tutorial_MPI_Applications.rst index 4c641cc3cc..f33253c86d 100644 --- a/docs/source/Tutorial_MPI_Applications.rst +++ b/docs/source/Tutorial_MPI_Applications.rst @@ -274,7 +274,7 @@ container to enjoy the provided dependencies. when you log out of the container, so don't edit the other files! All needed dependencies are already installed in this container -(SimGrid, the C/C++/Fortran compilers, make, pajeng and R). Vite being +(SimGrid, the C/C++/Fortran compilers, make, pajeng, R and pajengr). Vite being only optional in this tutorial, it is not installed to reduce the image size. @@ -303,6 +303,14 @@ Debian and Ubuntu for example, you can get them as follows: sudo apt install simgrid pajeng make gcc g++ gfortran vite +For R analysis of the produced traces, you may want to install R, +and the `pajengr_ package. + +.. code-block:: shell + + sudo apt install r-base r-cran-devtools cmake flex bison + Rscript -e "library(devtools); install_github('schnorr/pajengr');" + To take this tutorial, you will also need the platform files from the previous section as well as the source code of the NAS Parallel Benchmarks. Just clone `this repository @@ -397,7 +405,6 @@ use: .. code-block:: shell smpirun -np 4 -platform ../cluster_backbone.xml -trace --cfg=tracing/filename:lu.S.4.trace bin/lu.S.4 - pj_dump --ignore-incomplete-links lu.S.4.trace | grep State > lu.S.4.state.csv You can then produce a Gantt Chart with the following R chunk. You can either copy/paste it in a R session, or `turn it into a Rscript executable @@ -406,10 +413,11 @@ run it again and again. .. code-block:: R + library(pajengr) library(ggplot2) # Read the data - df_state = read.csv("lu.S.4.state.csv", header=F, strip.white=T) + df_state = pajeng_read("lu.S.4.trace") names(df_state) = c("Type", "Rank", "Container", "Start", "End", "Duration", "Level", "State"); df_state = df_state[!(names(df_state) %in% c("Type","Container","Level"))] df_state$Rank = as.numeric(gsub("rank-","",df_state$Rank)) diff --git a/tools/docker/Dockerfile.tuto-smpi b/tools/docker/Dockerfile.tuto-smpi index 1dba690346..77df6617d7 100644 --- a/tools/docker/Dockerfile.tuto-smpi +++ b/tools/docker/Dockerfile.tuto-smpi @@ -2,7 +2,9 @@ FROM simgrid/unstable # - Clone simgrid-template-smpi, as it is needed by the tutorial -RUN apt update && apt install -y pajeng r-base r-cran-ggplot2 r-cran-dplyr build-essential g++ gfortran git libboost-all-dev && \ +RUN apt update && apt install -y pajeng libssl-dev r-base r-cran-ggplot2 r-cran-dplyr r-cran-devtools build-essential g++ gfortran git libboost-all-dev cmake flex bison && \ cd /source && \ git clone --depth=1 https://framagit.org/simgrid/simgrid-template-smpi.git simgrid-template-smpi.git && \ - apt autoremove -y && apt clean && apt autoclean \ No newline at end of file + apt autoremove -y && apt clean && apt autoclean + +RUN Rscript -e "library(devtools); install_github('schnorr/pajengr');" -- 2.20.1