Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 4c6128f6 authored by FELŠÖCI Marek's avatar FELŠÖCI Marek
Browse files

Looks good

parent 27e0b1ff
No related branches found
No related tags found
No related merge requests found
#+TITLE: Minimal working example of an experimental study written in Org mode
#+AUTHOR: Marek Felšöci
#+DATE: {{{time(%B %d\, %Y)}}}
#+OPTIONS: toc:nil
#+LaTeX_CLASS: article
#+LaTeX_CLASS_OPTIONS: [a4paper, 11pt, twoside, table]
#+LaTeX_CLASS_OPTIONS: [a4paper, 11pt]
* Introduction
:PROPERTIES:
......@@ -31,7 +32,7 @@ different parts of the model.
#+CAPTION: A =cylinder= mesh counting 20,000 vertices.
#+NAME: short-pipe
#+ATTR_LaTeX: :width .5\columnwidth :placement [H]
#+ATTR_LaTeX: :width .5\columnwidth
[[./figures/cylinder.png]]
It is to note that the HMAT solver implements a data compression method which
......@@ -119,7 +120,8 @@ constructing our software environment and realizing the experiments. To do this,
run the command below in a terminal.
#+BEGIN_SRC shell
guix time-machine --commit=58786c82df700fb1f1c30022ee6ec0b2e7516e7b -- \
guix time-machine --no-channel-files \
--commit=58786c82df700fb1f1c30022ee6ec0b2e7516e7b -- \
shell --pure git emacs emacs-org -- emacs --batch --no-init-file -l org \
--eval '(progn (setq org-src-preserve-indentation t) (org-babel-tangle-file "study.org"))'
#+END_SRC
......@@ -155,7 +157,7 @@ guix time-machine -C channels.scm -- shell --pure -m manifest.scm -- \
The results are post-processed using scripts written in the R language. The
following commands shall produce the figures featured further on in the
document. See Section [[#plot-times]] and [[#plot-ram]] for a more detailed
document. See Section [[#plot-time]] and [[#plot-ram]] for a more detailed
explanation.
#+BEGIN_SRC shell
......@@ -245,7 +247,7 @@ itself as well as many other packages and libraries.
(channel
(name 'guix)
(url "https://git.savannah.gnu.org/git/guix.git")
(commit "58786c82df700fb1f1c30022ee6ec0b2e7516e7b"))
(commit "10f3dd0e9e06d71d1bc1615c6a60cc3aa1ad1ff4"))
#+END_SRC
In addition to the ='guix= channel, we will need an extra channel, the
......@@ -256,7 +258,7 @@ In addition to the ='guix= channel, we will need an extra channel, the
(name 'minichannel)
(url
"https://gitlab.inria.fr/tutorial-guix-hpc-workshop/software/minichannel")
(commit "22d134707af275389da71e3f26d1119a7b7ad090")))
(commit "aaa4002f4cc4fc3af31977ab17b655cbb14fe053")))
#+END_SRC
For each channel, we specify the commit of the associated repository to acquire.
......@@ -282,7 +284,7 @@ Scheme language, just like the channels.
In our environment, we need the =minisolver= package, for the experimental part.
#+BEGIN_SRC scheme
(specification->manifest
(specifications->manifest
(list
"minisolver"
#+END_SRC
......@@ -304,6 +306,19 @@ vector graphics.
"emacs-org"
"emacs-org-ref"
"emacs-ess"
"texlive-scheme-basic"
"texlive-hyperref"
"texlive-geometry"
"texlive-ec"
"texlive-float"
"texlive-latexmk"
"texlive-wrapfig"
"texlive-amsmath"
"texlive-ulem"
"texlive-capt-of"
"texlive-biblatex"
"texlive-biber"
"sed"
"inkscape"
#+END_SRC
......@@ -312,12 +327,7 @@ especially for gathering the machine info in the bash script defined in Section.
#+BEGIN_SRC scheme
"bash"
"coreutils"
"sed"
"grep"
"which"
"lshw"
"util-linux"))
"coreutils"))
#+END_SRC
** Benchmarks
......@@ -327,11 +337,11 @@ especially for gathering the machine info in the bash script defined in Section.
We benchmark =minisolver= on linear systems with $N$, the number of unknowns,
in (5,000; 10,000; 15,000; 20,000) while consider either the /low/ or the /high/
compression level. Table [[benchmarks-table]] lists all of the considered
# compression level. Table [[benchmarks-table]] lists all of the considered
benchmarks.
#+NAME: get-table
#+begin_src elisp :noweb yes
#+begin_src elisp :noweb yes :exports none
<<get-table-of-benchmarks>>
#+end_src
......@@ -476,11 +486,11 @@ with increasing size of the target linear system.
#+CAPTION: systems of varying size and using different compression levels.
#+NAME: results-time
#+ATTR_LaTeX: :width 1\columnwidth
[[./figures/results-time.svg]]
[[./figures/results-time.pdf]]
**** Plot :noexport:
:PROPERTIES:
:CUSTOM_ID: plot-times
:CUSTOM_ID: plot-time
:header-args: :tangle results-time.R
:END:
......@@ -532,7 +542,7 @@ geom_point(size = 2.5) +
Follows the configuration of axis and color legend labels
#+begin_src R
scale_x_continuous(name = "# Unknowns (\U1D441)") +
scale_x_continuous(name = "# Unknowns (N)") +
scale_y_continuous(name = "Computation time [s]") +
labs(color = "Compression level") +
#+end_src
......@@ -556,7 +566,7 @@ At the very end of the script, we produce the plot into a =*.svg= file while
specifying the destination as well as the initial dimensions.
#+begin_src R
ggsave(file = "figures/results-time.svg", plot = plot, width = 5, height = 5)
ggsave(file = "figures/results-time.pdf", plot = plot, width = 5, height = 5)
#+end_src
*** Peak RAM usage
......@@ -575,16 +585,16 @@ with increasing size of the target linear system.
#+CAPTION: varying size and using different compression levels.
#+NAME: results-ram
#+ATTR_LaTeX: :width 1\columnwidth
[[./figures/results-ram.svg]]
[[./figures/results-ram.pdf]]
**** Plot
**** Plot :noexport:
:PROPERTIES:
:CUSTOM_ID: plot-ram
:header-args: :tangle results-ram.R
:END:
To plot Figure [[results-ram]], we use nearly the same R script as in the case
of Figure [[results-time]] (see Section [[plot-time]]).
of Figure [[results-time]] (see Section [[#plot-time]]).
#+begin_src R
library(svglite)
......@@ -602,7 +612,7 @@ plot <- ggplot(
) +
geom_line() +
geom_point(size = 2.5) +
scale_x_continuous(name = "# Unknowns (\U1D441)") +
scale_x_continuous(name = "# Unknowns (N)") +
scale_y_continuous(name = "RAM usage peaks [MiB]") +
labs(color = "Compression level") +
scale_color_manual(
......@@ -614,7 +624,7 @@ theme_bw()
The destination file name changes too, of course.
#+begin_src R
ggsave(file = "figures/results-ram.svg", plot = plot, width = 5, height = 5)
ggsave(file = "figures/results-ram.pdf", plot = plot, width = 5, height = 5)
#+end_src
* Conclusion
......@@ -693,11 +703,11 @@ a custom appearance configuration.
#+begin_src elisp
(setq org-latex-packages-alist '())
(add-to-list 'org-latex-packages-alist '("" "minted"))
(setq org-latex-listings 'minted)
(setq org-latex-minted-options
'(("linenos = false") ("mathescape") ("breaklines")
("style = monokai")))
;;(add-to-list 'org-latex-packages-alist '("" "minted"))
;;(setq org-latex-listings 'minted)
;;(setq org-latex-minted-options
;; '(("linenos = false") ("mathescape") ("breaklines")
;; ("style = monokai")))
#+end_src
The export to a LaTeX PDF triggers the inclusion of a certain number of LaTeX
......@@ -705,8 +715,8 @@ packages by default. However, we need to include an extra package, i.e. the
=svg= package, allowing us to use =*.svg= files in the manuscript.
#+begin_src elisp
(add-to-list 'org-latex-packages-alist
'("inkscapelatex = false, inkscapearea = page" "svg"))
;;(add-to-list 'org-latex-packages-alist
;; '("inkscapelatex = false, inkscapearea = page" "svg"))
#+end_src
Eventually, we set up a list of publishing targets. Here, we have a single
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment