<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.4.3">Jekyll</generator><link href="https://plasma.ninja/blog/feed.xml" rel="self" type="application/atom+xml" /><link href="https://plasma.ninja/blog/" rel="alternate" type="text/html" /><updated>2019-02-09T16:28:25+01:00</updated><id>https://plasma.ninja/blog/</id><title type="html">Beware, Here Be Plasma Ninjas</title><subtitle>Axel might write about supercomputing (HPC), simulations and modeling, laser-plasma physics, free/libre open source software, applied crypto/privacy tools and general geek-ism.
</subtitle><entry><title type="html">The Green HPCG List</title><link href="https://plasma.ninja/blog/hpc/manycore/top500/computing/hardware/energy/efficiency/2018/11/18/HPCG_Green.html" rel="alternate" type="text/html" title="The Green HPCG List" /><published>2018-11-18T01:17:53+01:00</published><updated>2018-11-18T01:17:53+01:00</updated><id>https://plasma.ninja/blog/hpc/manycore/top500/computing/hardware/energy/efficiency/2018/11/18/HPCG_Green</id><content type="html" xml:base="https://plasma.ninja/blog/hpc/manycore/top500/computing/hardware/energy/efficiency/2018/11/18/HPCG_Green.html">&lt;p&gt;SC18 is in the books now and the latest TOP500 results are out.
Perfect time for some play with numbers!&lt;/p&gt;

&lt;p&gt;This post will focus one efficiency, in terms of performance per Watt, simply because system power envelope is a major constrain for upcoming Exascale systems.
With the great numbers from &lt;a href=&quot;https://top500.org&quot;&gt;TOP500&lt;/a&gt;, we try to extend theoretical estimates from &lt;a href=&quot;https://www.karlrupp.net/2013/06/cpu-gpu-and-mic-hardware-characteristics-over-time/&quot;&gt;theoretical Flop/Ws&lt;/a&gt; of individual compute hardware to system scale.&lt;/p&gt;

&lt;p&gt;Of course, we do have the &lt;a href=&quot;https://top500.org/green500/&quot;&gt;Green 500&lt;/a&gt;, but let us compare something different this time…&lt;/p&gt;

&lt;h2 id=&quot;hpcg&quot;&gt;HPCG&lt;/h2&gt;

&lt;p&gt;Since recently, an additional benchmark complementing raw LINPACK performance (TOP500 metric) on systems was introduced called &lt;a href=&quot;https://top500.org/hpcg&quot;&gt;HPCG&lt;/a&gt;.
The &lt;em&gt;H&lt;/em&gt;igh &lt;em&gt;P&lt;/em&gt;erformance &lt;em&gt;C&lt;/em&gt;onjugate &lt;em&gt;G&lt;/em&gt;radients benchmark project computes a &lt;a href=&quot;https://en.wikipedia.org/wiki/Conjugate_gradient_method&quot;&gt;conjugate gradient (CG) method&lt;/a&gt; which is contrary to the dense matrix operations in LINPACK a sparse task.&lt;/p&gt;

&lt;p&gt;Why would this be interesting?
Besides the &lt;a href=&quot;https://www.hpcg-benchmark.org/faq/index.html&quot;&gt;official list&lt;/a&gt; of reasons on the project page and the use of the method itself for e.g. solving long-range potentials, CG is a good measure for many kinds of finite stencil-based codes such as fluid solvers, &lt;a href=&quot;https://en.wikipedia.org/wiki/Finite-difference_time-domain_method&quot;&gt;FDTD&lt;/a&gt; solvers, finite element solvers and the like.&lt;/p&gt;

&lt;p&gt;CG is, contrary to LINPACK, quickly memory bound and reasonably communication intensive at scale, just like most real-world science problems.
That means for a system benchmark, well-designed networking and per-node performance (fat nodes) get a bigger role in order to push down latencies.&lt;/p&gt;

&lt;p&gt;Last but not least, as far as I am aware, CG does not benefit from the recently introduced &lt;a href=&quot;https://en.wikipedia.org/wiki/Volta_(microarchitecture)&quot;&gt;tensor cores&lt;/a&gt; in Nvidia’s Volta generation.
(Simply because those cores are also made for &lt;em&gt;dense&lt;/em&gt; matrix-matrix operations and packing overhead and reduction of parallelism in blocks does not play well when also calculating a lot of zeros.)
LINPACK, or to be more precise the multi-node implementation &lt;a href=&quot;http://www.netlib.org/benchmark/hpl/&quot;&gt;HPL&lt;/a&gt;, does not use tensor cores yet either, but &lt;a href=&quot;http://www.netlib.org/utk/people/JackDongarra/PAPERS/haidar_fp16_sc18.pdf&quot;&gt;research is done in that field&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So all-in-all, HPCG as the Flop/s measure for an energy comparison seems to be an exciting and somewhat fair starting point to look at.&lt;/p&gt;

&lt;h2 id=&quot;method-for-an-unofficial-green-hpcg&quot;&gt;Method for an (Unofficial) “Green HPCG”&lt;/h2&gt;

&lt;p&gt;So let us take the official HPCG list and calculate a “Green HPCG” from it.
Why should LINPACK be the only metric for Flop/s and efficiency?
This “unofficial” list is just like the official &lt;a href=&quot;https://top500.org/green500/&quot;&gt;Green500&lt;/a&gt; list, but swapping LINPACK Flop/s for HPCG Flop/s.&lt;/p&gt;

&lt;p&gt;Of course, data was not complete: not all HPCG (and even TOP500) candidates submit power and not all Green 500 listings have a HPCG submission.&lt;/p&gt;

&lt;h2 id=&quot;and-the-winner-is-&quot;&gt;And the Winner is …&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://top500.org/system/179442&quot;&gt;MareNostrum P9 CTE&lt;/a&gt; with 327 MFlop/Ws!
A system at rank 411 in the TOP500!
Positioned slightly before &lt;a href=&quot;https://top500.org/system/179393&quot;&gt;AI Bridging Cloud&lt;/a&gt; (309 MFlop/Ws) and &lt;a href=&quot;https://top500.org/system/179397&quot;&gt;Summit&lt;/a&gt; (299 MFlop/Ws).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://top500.org/system/179398&quot;&gt;Sierra&lt;/a&gt; is on place four with 241 MFlop/Ws - interesting difference for a Summit-twin.&lt;/p&gt;

&lt;p&gt;The list goes on with recent GPU systems until Xeon Phi (MIC) kicks in at 142 MFlop/Ws for &lt;a href=&quot;https://top500.org/system/178932&quot;&gt;Oakforest-PACS&lt;/a&gt; and the best x86 system, BSC with &lt;a href=&quot;https://top500.org/system/179067&quot;&gt;MareNostrum&lt;/a&gt; again (!), with 75 MFlop/Ws.&lt;/p&gt;

&lt;div style=&quot;max-height:50vh; overflow-y: scroll&quot;&gt;
&lt;style scoped=&quot;&quot;&gt;
    .dataframe table {
        margin-left: 0;
        margin-right: 0;
        margin-top: 1em;
        border-collapse: collapse;
        border-spacing: 0;
        border: none;
    }
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
        text-align: right;
    }
    .dataframe tbody tr th {
        vertical-align: top;
        text-align: right;
        border: none;
    }
    .dataframe tbody td {
        border: none;
    }
    .dataframe tbody tr {
        border: none;
    }
    .dataframe tbody tr:nth-child(2n+1) {
        background: #f5f5f5;
    }
    .dataframe thead th {
        text-align: right;
        border-bottom: 1px solid black;
        vertical-align: bottom;
        border: none;
    }
&lt;/style&gt;
&lt;table border=&quot;1&quot; class=&quot;dataframe&quot;&gt;
  &lt;thead&gt;
    &lt;tr style=&quot;text-align: right;&quot;&gt;
      &lt;th&gt;HPCG Rank&lt;/th&gt;
      &lt;th&gt;LINPACK Rank&lt;/th&gt;
      &lt;th&gt;System&lt;/th&gt;
      &lt;th&gt;GFlop/Ws&lt;/th&gt;
      &lt;th&gt;Arch&lt;/th&gt;
      &lt;th&gt;Launch&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;54&lt;/td&gt;
      &lt;td&gt;411&lt;/td&gt;
      &lt;td&gt;MareNostrum P9 CTE- IBM Power System AC922 IBM...&lt;/td&gt;
      &lt;td&gt;0.326807&lt;/td&gt;
      &lt;td&gt;GPU&lt;/td&gt;
      &lt;td&gt;06/2018&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;5&lt;/td&gt;
      &lt;td&gt;7&lt;/td&gt;
      &lt;td&gt;AI Bridging Cloud Infrastructure (ABCI)- PRIME...&lt;/td&gt;
      &lt;td&gt;0.308534&lt;/td&gt;
      &lt;td&gt;GPU&lt;/td&gt;
      &lt;td&gt;06/2018&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;Summit- IBM Power System AC922 IBM POWER9 22C ...&lt;/td&gt;
      &lt;td&gt;0.299065&lt;/td&gt;
      &lt;td&gt;GPU&lt;/td&gt;
      &lt;td&gt;06/2018&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;Sierra- IBM Power System S922LC IBM POWER9 22C...&lt;/td&gt;
      &lt;td&gt;0.241418&lt;/td&gt;
      &lt;td&gt;GPU&lt;/td&gt;
      &lt;td&gt;06/2018&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;16&lt;/td&gt;
      &lt;td&gt;22&lt;/td&gt;
      &lt;td&gt;TSUBAME3,0- SGI ICE XA IP139-SXM2 Xeon E5-2680...&lt;/td&gt;
      &lt;td&gt;0.238133&lt;/td&gt;
      &lt;td&gt;GPU&lt;/td&gt;
      &lt;td&gt;06/2017&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;6&lt;/td&gt;
      &lt;td&gt;5&lt;/td&gt;
      &lt;td&gt;Piz Daint- Cray XC50 Xeon E5-2690v3 12C 2,6GHz...&lt;/td&gt;
      &lt;td&gt;0.208444&lt;/td&gt;
      &lt;td&gt;GPU&lt;/td&gt;
      &lt;td&gt;11/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;14&lt;/td&gt;
      &lt;td&gt;15&lt;/td&gt;
      &lt;td&gt;HPC4- Proliant DL380 Gen10 Xeon Platinum 8160 ...&lt;/td&gt;
      &lt;td&gt;0.205962&lt;/td&gt;
      &lt;td&gt;GPU&lt;/td&gt;
      &lt;td&gt;06/2018&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;35&lt;/td&gt;
      &lt;td&gt;51&lt;/td&gt;
      &lt;td&gt;DGX Saturn V- NVIDIA DGX-1 Xeon E5-2698v4 20C ...&lt;/td&gt;
      &lt;td&gt;0.192904&lt;/td&gt;
      &lt;td&gt;GPU&lt;/td&gt;
      &lt;td&gt;11/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;9&lt;/td&gt;
      &lt;td&gt;14&lt;/td&gt;
      &lt;td&gt;Oakforest-PACS- PRIMERGY CX1640 M1 Intel Xeon ...&lt;/td&gt;
      &lt;td&gt;0.141788&lt;/td&gt;
      &lt;td&gt;MIC&lt;/td&gt;
      &lt;td&gt;11/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;48&lt;/td&gt;
      &lt;td&gt;243&lt;/td&gt;
      &lt;td&gt;JOLIOT-CURIE KNL- Bull Sequana X1000 Intel Xeo...&lt;/td&gt;
      &lt;td&gt;0.114417&lt;/td&gt;
      &lt;td&gt;MIC&lt;/td&gt;
      &lt;td&gt;06/2018&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;11&lt;/td&gt;
      &lt;td&gt;16&lt;/td&gt;
      &lt;td&gt;Tera-1000-2- Bull Sequana X1000 Intel Xeon Phi...&lt;/td&gt;
      &lt;td&gt;0.105022&lt;/td&gt;
      &lt;td&gt;MIC&lt;/td&gt;
      &lt;td&gt;06/2018&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;10&lt;/td&gt;
      &lt;td&gt;12&lt;/td&gt;
      &lt;td&gt;Cori- Cray XC40 Intel Xeon Phi 7250 68C 1,4GHz...&lt;/td&gt;
      &lt;td&gt;0.090236&lt;/td&gt;
      &lt;td&gt;MIC&lt;/td&gt;
      &lt;td&gt;11/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;21&lt;/td&gt;
      &lt;td&gt;25&lt;/td&gt;
      &lt;td&gt;MareNostrum- Lenovo SD530 Xeon Platinum 8160 2...&lt;/td&gt;
      &lt;td&gt;0.074902&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2017&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;49&lt;/td&gt;
      &lt;td&gt;91&lt;/td&gt;
      &lt;td&gt;ATERUI II - Cray XC50 Xeon Gold 6148 20C 2,4GH...&lt;/td&gt;
      &lt;td&gt;0.073892&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2018&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;4&lt;/td&gt;
      &lt;td&gt;6&lt;/td&gt;
      &lt;td&gt;Trinity- Cray XC40 Xeon E5-2698v3 16C 2,3GHz I...&lt;/td&gt;
      &lt;td&gt;0.072066&lt;/td&gt;
      &lt;td&gt;MIC&lt;/td&gt;
      &lt;td&gt;11/2017&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;23&lt;/td&gt;
      &lt;td&gt;56&lt;/td&gt;
      &lt;td&gt;SORA-MA- Fujitsu PRIMEHPC FX100 SPARC64 XIfx 3...&lt;/td&gt;
      &lt;td&gt;0.066667&lt;/td&gt;
      &lt;td&gt;SPARC64&lt;/td&gt;
      &lt;td&gt;06/2015&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;24&lt;/td&gt;
      &lt;td&gt;33&lt;/td&gt;
      &lt;td&gt;Electra- HPE SGI 8600/SGI ICE-X E5-2680V4/ Xeo...&lt;/td&gt;
      &lt;td&gt;0.063201&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;11/2018&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;26&lt;/td&gt;
      &lt;td&gt;63&lt;/td&gt;
      &lt;td&gt;Fujitsu PRIMEHPC FX100 SPARC64 XIfx 32C 2,2GHz...&lt;/td&gt;
      &lt;td&gt;0.062594&lt;/td&gt;
      &lt;td&gt;SPARC64&lt;/td&gt;
      &lt;td&gt;11/2015&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;31&lt;/td&gt;
      &lt;td&gt;84&lt;/td&gt;
      &lt;td&gt;Plasma Simulator- Fujitsu PRIMEHPC FX100 SPARC...&lt;/td&gt;
      &lt;td&gt;0.058843&lt;/td&gt;
      &lt;td&gt;SPARC64&lt;/td&gt;
      &lt;td&gt;06/2015&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;41&lt;/td&gt;
      &lt;td&gt;40&lt;/td&gt;
      &lt;td&gt;JOLIOT-CURIE SKL- Bull Sequana X1000 Xeon Plat...&lt;/td&gt;
      &lt;td&gt;0.057448&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2018&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;57&lt;/td&gt;
      &lt;td&gt;361&lt;/td&gt;
      &lt;td&gt;Falcon- SGI ICE X Xeon E5-2695v4 18C 2,1GHz In...&lt;/td&gt;
      &lt;td&gt;0.055593&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;11/2017&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;32&lt;/td&gt;
      &lt;td&gt;69&lt;/td&gt;
      &lt;td&gt;TSUBAME 2,5- Cluster Platform SL390s G7 Xeon X...&lt;/td&gt;
      &lt;td&gt;0.051859&lt;/td&gt;
      &lt;td&gt;GPU&lt;/td&gt;
      &lt;td&gt;06/2014&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;34&lt;/td&gt;
      &lt;td&gt;44&lt;/td&gt;
      &lt;td&gt;JURECA- T-Platforms V-Class/Dell C6320P E5-268...&lt;/td&gt;
      &lt;td&gt;0.050800&lt;/td&gt;
      &lt;td&gt;GPU&lt;/td&gt;
      &lt;td&gt;11/2017&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;25&lt;/td&gt;
      &lt;td&gt;36&lt;/td&gt;
      &lt;td&gt;Cheyenne- SGI ICE XA Xeon E5-2697v4 18C 2,3GHz...&lt;/td&gt;
      &lt;td&gt;0.050539&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;11/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;46&lt;/td&gt;
      &lt;td&gt;131&lt;/td&gt;
      &lt;td&gt;Prometheus- HP Apollo 8000 Xeon E5-2680v3 12C ...&lt;/td&gt;
      &lt;td&gt;0.049455&lt;/td&gt;
      &lt;td&gt;GPU&lt;/td&gt;
      &lt;td&gt;11/2015&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;40&lt;/td&gt;
      &lt;td&gt;253&lt;/td&gt;
      &lt;td&gt;iDataPlex DX360M4 Intel Xeon E5-2680v2 10C 2,8...&lt;/td&gt;
      &lt;td&gt;0.048786&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;11/2013&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;3&lt;/td&gt;
      &lt;td&gt;18&lt;/td&gt;
      &lt;td&gt;K computer SPARC64 VIIIfx 2,0GHz Tofu intercon...&lt;/td&gt;
      &lt;td&gt;0.047610&lt;/td&gt;
      &lt;td&gt;SPARC64&lt;/td&gt;
      &lt;td&gt;11/2011&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;55&lt;/td&gt;
      &lt;td&gt;246&lt;/td&gt;
      &lt;td&gt;Cobalt- bullx DLC 720 Xeon E5-2680v4 14C 2,4GH...&lt;/td&gt;
      &lt;td&gt;0.043080&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;50&lt;/td&gt;
      &lt;td&gt;90&lt;/td&gt;
      &lt;td&gt;Beaufix2- bullx DLC 720 Xeon E5-2698v4 20C 2,2...&lt;/td&gt;
      &lt;td&gt;0.042580&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;11/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;51&lt;/td&gt;
      &lt;td&gt;89&lt;/td&gt;
      &lt;td&gt;Prolix2- bullx DLC 720 Xeon E5-2698v4 20C 2,2G...&lt;/td&gt;
      &lt;td&gt;0.042570&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;18&lt;/td&gt;
      &lt;td&gt;21&lt;/td&gt;
      &lt;td&gt;Mira- BlueGene/Q Power BQC 16C 1,60GHz Custom ...&lt;/td&gt;
      &lt;td&gt;0.042345&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2012&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;12&lt;/td&gt;
      &lt;td&gt;10&lt;/td&gt;
      &lt;td&gt;Sequoia- BlueGene/Q Power BQC 16C 1,60 GHz Cus...&lt;/td&gt;
      &lt;td&gt;0.041872&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2012&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;28&lt;/td&gt;
      &lt;td&gt;39&lt;/td&gt;
      &lt;td&gt;Vulcan- BlueGene/Q Power BQC 16C 1,600GHz Cust...&lt;/td&gt;
      &lt;td&gt;0.041019&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2013&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;22&lt;/td&gt;
      &lt;td&gt;32&lt;/td&gt;
      &lt;td&gt;Shaheen II- Cray XC40 Xeon E5-2698v3 16C 2,3GH...&lt;/td&gt;
      &lt;td&gt;0.040180&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;05/2015&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;43&lt;/td&gt;
      &lt;td&gt;55&lt;/td&gt;
      &lt;td&gt;HPC2- iDataPlex DX360M4 Intel Xeon E5-2680v2 1...&lt;/td&gt;
      &lt;td&gt;0.039853&lt;/td&gt;
      &lt;td&gt;GPU&lt;/td&gt;
      &lt;td&gt;06/2014&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;17&lt;/td&gt;
      &lt;td&gt;27&lt;/td&gt;
      &lt;td&gt;Pleiades- SGI ICE X Intel Xeon E5-2670/E5-2680...&lt;/td&gt;
      &lt;td&gt;0.039750&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;11/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;56&lt;/td&gt;
      &lt;td&gt;271&lt;/td&gt;
      &lt;td&gt;Graham- Huawei X6800 V3 Xeon E5-2683 v4 16C 2,...&lt;/td&gt;
      &lt;td&gt;0.039539&lt;/td&gt;
      &lt;td&gt;GPU&lt;/td&gt;
      &lt;td&gt;06/2017&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;45&lt;/td&gt;
      &lt;td&gt;62&lt;/td&gt;
      &lt;td&gt;Mistral- bullx DLC 720 Xeon E5-2680v3 12C 2,5G...&lt;/td&gt;
      &lt;td&gt;0.039525&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;13&lt;/td&gt;
      &lt;td&gt;9&lt;/td&gt;
      &lt;td&gt;Titan- Cray XK7 Opteron 6274 16C 2,200GHz Cray...&lt;/td&gt;
      &lt;td&gt;0.039264&lt;/td&gt;
      &lt;td&gt;GPU&lt;/td&gt;
      &lt;td&gt;11/2012&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;19&lt;/td&gt;
      &lt;td&gt;34&lt;/td&gt;
      &lt;td&gt;Pangea- SGI ICE X Xeon Xeon E5-2670/ E5-2680v3...&lt;/td&gt;
      &lt;td&gt;0.039202&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;20&lt;/td&gt;
      &lt;td&gt;30&lt;/td&gt;
      &lt;td&gt;Hazel Hen- Cray XC40 Xeon E5-2680v3 12C 2,5GHz...&lt;/td&gt;
      &lt;td&gt;0.038174&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;11/2014&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;47&lt;/td&gt;
      &lt;td&gt;92&lt;/td&gt;
      &lt;td&gt;Tianhe-2 LvLiang Solution- Tianhe-2 LvLiang In...&lt;/td&gt;
      &lt;td&gt;0.037723&lt;/td&gt;
      &lt;td&gt;MIC&lt;/td&gt;
      &lt;td&gt;11/2014&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;38&lt;/td&gt;
      &lt;td&gt;42&lt;/td&gt;
      &lt;td&gt;Cray XC40 Xeon E5-2695v4 18C 2,1GHz Aries inte...&lt;/td&gt;
      &lt;td&gt;0.034507&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;37&lt;/td&gt;
      &lt;td&gt;43&lt;/td&gt;
      &lt;td&gt;Cray XC40 Xeon E5-2695v4 18C 2,1GHz Aries inte...&lt;/td&gt;
      &lt;td&gt;0.034507&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;52&lt;/td&gt;
      &lt;td&gt;105&lt;/td&gt;
      &lt;td&gt;Tera-1000-1- bullx DLC 720 Xeon E5-2698v3 16C ...&lt;/td&gt;
      &lt;td&gt;0.033772&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;44&lt;/td&gt;
      &lt;td&gt;77&lt;/td&gt;
      &lt;td&gt;occigen2- bullx DLC 720 Xeon E5-2690v4 14C 2,6...&lt;/td&gt;
      &lt;td&gt;0.031797&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2017&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;7&lt;/td&gt;
      &lt;td&gt;3&lt;/td&gt;
      &lt;td&gt;Sunway TaihuLight- Sunway MPP Sunway SW26010 2...&lt;/td&gt;
      &lt;td&gt;0.031283&lt;/td&gt;
      &lt;td&gt;Sunway&lt;/td&gt;
      &lt;td&gt;06/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;59&lt;/td&gt;
      &lt;td&gt;230&lt;/td&gt;
      &lt;td&gt;Sid- bullx DLC 720 Xeon E5-2695v4 18C 2,1GHz I...&lt;/td&gt;
      &lt;td&gt;0.030718&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2016&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;58&lt;/td&gt;
      &lt;td&gt;360&lt;/td&gt;
      &lt;td&gt;Cartesius 2- Bullx DLC B710/B720 Blades Xeon E...&lt;/td&gt;
      &lt;td&gt;0.027578&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2015&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;60&lt;/td&gt;
      &lt;td&gt;212&lt;/td&gt;
      &lt;td&gt;Endeavor- Intel Cluster Intel Xeon Gold 6148/X...&lt;/td&gt;
      &lt;td&gt;0.025893&lt;/td&gt;
      &lt;td&gt;MIC&lt;/td&gt;
      &lt;td&gt;11/2017&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;29&lt;/td&gt;
      &lt;td&gt;186&lt;/td&gt;
      &lt;td&gt;ARCHER- Cray XC30 Intel Xeon E5 v2 12C 2,700GH...&lt;/td&gt;
      &lt;td&gt;0.024436&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;11/2014&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;27&lt;/td&gt;
      &lt;td&gt;64&lt;/td&gt;
      &lt;td&gt;SuperMUC- iDataPlex DX360M4 Xeon E5-2680 8C 2,...&lt;/td&gt;
      &lt;td&gt;0.024338&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2012&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;42&lt;/td&gt;
      &lt;td&gt;231&lt;/td&gt;
      &lt;td&gt;Curie thin nodes- Bullx B510 Xeon E5-2680 8C 2...&lt;/td&gt;
      &lt;td&gt;0.023917&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2012&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;30&lt;/td&gt;
      &lt;td&gt;134&lt;/td&gt;
      &lt;td&gt;Edison- Cray XC30 Intel Xeon E5-2695v2 12C 2,4...&lt;/td&gt;
      &lt;td&gt;0.020987&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2014&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;61&lt;/td&gt;
      &lt;td&gt;416&lt;/td&gt;
      &lt;td&gt;EAGLE- Huawei E9000 Blade Server Xeon E5-2697v...&lt;/td&gt;
      &lt;td&gt;0.015520&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;11/2015&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;62&lt;/td&gt;
      &lt;td&gt;487&lt;/td&gt;
      &lt;td&gt;Lomonosov- T-Platforms T-Blade2/1,1 Xeon X5570...&lt;/td&gt;
      &lt;td&gt;0.000621&lt;/td&gt;
      &lt;td&gt;x86&lt;/td&gt;
      &lt;td&gt;06/2011&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;

&lt;p&gt;Notes: Some systems are mixed, e.g. &lt;a href=&quot;https://top500.org/system/178718&quot;&gt;JURECA&lt;/a&gt; (11/2017 upgrade) has Kepler GPUs (2015) and Xeon Phi accelerators (2017), which is categorized as “GPU” arch (probably wrong categorization and likely benchmarked for a sub-system).
For &lt;a href=&quot;https://top500.org/system/179566&quot;&gt;SuperMUC-NG&lt;/a&gt;, no official power-numbers are yet available, maybe 3-6 MW are likely (estimating 69-35 MFlop/Ws).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/hpcg/2018_11_HPCG_Green.png&quot; alt=&quot;Unofficial Green HPCG&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;trends&quot;&gt;Trends&lt;/h2&gt;

&lt;p&gt;The top places are taken by Nvidia P100 &amp;amp; V100 GPUs, likely due to two reasons: a significant efficiency improvement in Pascal and Volta and (finally) the launch of multi-accelerator nodes in large systems.&lt;/p&gt;

&lt;p&gt;(&lt;a href=&quot;https://www.karlrupp.net/2013/06/cpu-gpu-and-mic-hardware-characteristics-over-time/&quot;&gt;Karl&lt;/a&gt;, if you are reading this: let’s put new numbers in your post to falsify or proof the first point ;-) )&lt;/p&gt;

&lt;p&gt;On the second group is taken by (2017) MIC systems.
I tried to group by “launch” of systems in TOP500 submissions, looking at an evolution over time.
One can see that there was already a significant gap in 2016/17 between the two which has now been widened with Knights Hill being canceled and Knights Mill (likely also a LINPACK/ML focused hardware) not yet released.&lt;/p&gt;

&lt;p&gt;As a little surprise, the RISC architecture SPARC64 which launched in year 2011 is still amazingly well positioned.
Even today, it is close to recently built x86 systems.
Let’s see where the upcoming &lt;a href=&quot;https://www.nextplatform.com/2018/08/24/fujitsus-a64fx-arm-chip-waves-the-hpc-banner-high/&quot;&gt;A64FX&lt;/a&gt; will be heading.&lt;/p&gt;

&lt;p&gt;Sunway’s SW26010, introduced in 2016, is surprisingly low in our little comparison.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/hpcg/2018_11_HPCG_Green.gif&quot; alt=&quot;Green HPCG over time&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;conclusions&quot;&gt;Conclusions&lt;/h2&gt;

&lt;p&gt;General purpose RISC architectures are leading in this comparison even more than in the official Green500.
In that sense, it would be really interesting if a power consumption number was submitted for Sandia’s &lt;a href=&quot;https://top500.org/system/179565&quot;&gt;Astra (Cavium ThunderX2)&lt;/a&gt; cluster.
But either way, is our comparison fair?&lt;/p&gt;

&lt;p&gt;Likely not more than any other metric for calculating efficiency.
But let’s assume that most scientific HPC applications lie somewhere between the official LINPACK and HPCG benchmarks, so we should consider both metrics for efficiency as well.&lt;/p&gt;

&lt;h2 id=&quot;data&quot;&gt;Data&lt;/h2&gt;

&lt;p&gt;An interactive Jupyter Notebook and the HPCG data with added system power consumption have been uploaded to &lt;a href=&quot;https://doi.org/10.14278/rodare.68&quot;&gt;DOI:10.14278/rodare.68&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enjoy playing with it!&lt;/p&gt;

&lt;h2 id=&quot;updates&quot;&gt;Updates&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;2018-11-18 3:38PM (CET):&lt;/em&gt;
Avoid implying that HPL is able to use FP16 tensor cores already for TOP500 benchmarks.
Clarified with an additional sentence and link to a recent paper, thanks &lt;a href=&quot;https://twitter.com/HPCsharp/status/1064149146565783552&quot;&gt;Timothy&lt;/a&gt;!&lt;/p&gt;</content><author><name></name></author><summary type="html">SC18 is in the books now and the latest TOP500 results are out. Perfect time for some play with numbers!</summary></entry><entry><title type="html">reMarkable .lines File Format</title><link href="https://plasma.ninja/blog/devices/remarkable/binary/format/2017/12/26/reMarkable-lines-file-format.html" rel="alternate" type="text/html" title="reMarkable .lines File Format" /><published>2017-12-26T14:36:12+01:00</published><updated>2017-12-26T14:36:12+01:00</updated><id>https://plasma.ninja/blog/devices/remarkable/binary/format/2017/12/26/reMarkable-lines-file-format</id><content type="html" xml:base="https://plasma.ninja/blog/devices/remarkable/binary/format/2017/12/26/reMarkable-lines-file-format.html">&lt;p&gt;Happy holidays everyone!&lt;/p&gt;

&lt;p&gt;The days before Christmas I took two evenings for a little project.
I tried to understand the binary file format the &lt;a href=&quot;https://remarkable.com&quot;&gt;reMarkable e-ink tablet&lt;/a&gt; creates when drawing on it, the &lt;code class=&quot;highlighter-rouge&quot;&gt;.lines&lt;/code&gt; (nowadays &lt;code class=&quot;highlighter-rouge&quot;&gt;.rm&lt;/code&gt;) file.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;.rm&lt;/code&gt; files are part of the stored notebooks (and annotated PDFs) on the tablet.
It is stored &lt;a href=&quot;/blog/devices/remarkable/2017/12/18/reMarkable-exporation.html&quot;&gt;together with further textual meta information&lt;/a&gt; (JSON) under &lt;code class=&quot;highlighter-rouge&quot;&gt;.local/share/remarkable/xochitl/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Since this is my first time decoding a binary format my approach might have been a bit… unusual.
Anyway, this blog post will explain you &lt;em&gt;what&lt;/em&gt; I found and a follow-up post will explain the &lt;em&gt;how&lt;/em&gt; (cliffhanger!).&lt;/p&gt;

&lt;h2 id=&quot;notebooks&quot;&gt;Notebooks&lt;/h2&gt;

&lt;p&gt;New and annotated files on the reMarkable tablet are called &lt;em&gt;notebooks&lt;/em&gt;.
A notebook consists of &lt;em&gt;pages&lt;/em&gt;.
Each &lt;em&gt;page&lt;/em&gt; has one background &lt;em&gt;layer&lt;/em&gt; (PNG or PDF page) and up to five &lt;em&gt;layers&lt;/em&gt; for your drawings.
Each &lt;em&gt;layer&lt;/em&gt; then stores a set of &lt;em&gt;lines&lt;/em&gt; which again consists of &lt;em&gt;points&lt;/em&gt; (dots? ;) ).&lt;/p&gt;

&lt;p&gt;(Note: I am defining the wordings as I go to names that appear reasonable to me.)&lt;/p&gt;

&lt;p&gt;A single &lt;em&gt;line&lt;/em&gt; can have exactly one color, one brush type &amp;amp; one base size.
Each &lt;em&gt;point&lt;/em&gt; inside a &lt;em&gt;line&lt;/em&gt; has three attributes: two &lt;em&gt;coordinates&lt;/em&gt;, a &lt;em&gt;pressure&lt;/em&gt; and two &lt;em&gt;angles&lt;/em&gt; for the pen’s steepness to the surface.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/reMarkable/2017_12_21_reMarkableAll.png&quot; alt=&quot;reMarkable .rm file format listing&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;rm-format&quot;&gt;.rm Format&lt;/h2&gt;

&lt;p&gt;reMarkable &lt;code class=&quot;highlighter-rouge&quot;&gt;.lines&lt;/code&gt; (now &lt;code class=&quot;highlighter-rouge&quot;&gt;.rm&lt;/code&gt;) files are contiguous, uncompressed binaries with sections similar to the RAM representation of a plain &lt;code class=&quot;highlighter-rouge&quot;&gt;struct&lt;/code&gt; (POD).
The byte order is little endian and standard data types are used (ASCII chars, four-Byte ints and IEEE floats).&lt;/p&gt;

&lt;p&gt;The first &lt;strong&gt;43 Bytes&lt;/strong&gt; consist of the char-text &lt;code class=&quot;highlighter-rouge&quot;&gt;reMarkable lines with selections and layers&lt;/code&gt; and zero-padding.
&lt;em&gt;Update v3:&lt;/em&gt; now &lt;code class=&quot;highlighter-rouge&quot;&gt;reMarkable .lines file, version=3&lt;/code&gt; and 10 spaces.&lt;/p&gt;

&lt;p&gt;If follows an &lt;code class=&quot;highlighter-rouge&quot;&gt;int32_t&lt;/code&gt; (&lt;strong&gt;4 Bytes&lt;/strong&gt;) with the &lt;em&gt;number of pages&lt;/em&gt;.
&lt;em&gt;(Removed in v3, now one page per file.)&lt;/em&gt;
After that, loop over the retrieved &lt;em&gt;number of pages&lt;/em&gt; - the file format contains no end-of-page, end-of-file or similar symbols.&lt;/p&gt;

&lt;p&gt;Directly at the beginning of the now following &lt;em&gt;page&lt;/em&gt; section, the next &lt;strong&gt;4 Bytes&lt;/strong&gt; are an &lt;code class=&quot;highlighter-rouge&quot;&gt;int32_t&lt;/code&gt; again for the &lt;em&gt;number of layers&lt;/em&gt; inside the page.
Again, loop over the retrieved &lt;em&gt;number of layers&lt;/em&gt; for the next reads.&lt;/p&gt;

&lt;p&gt;A &lt;em&gt;layer&lt;/em&gt; then in turn has first &lt;strong&gt;4 Bytes&lt;/strong&gt; with an &lt;code class=&quot;highlighter-rouge&quot;&gt;int32_t&lt;/code&gt; for the &lt;em&gt;number of lines&lt;/em&gt; inside it.
You now guessed it, loop over the retrieved &lt;em&gt;number of lines&lt;/em&gt; for the next reads.&lt;/p&gt;

&lt;p&gt;Now a &lt;em&gt;line&lt;/em&gt; has the following attributes: &lt;strong&gt;4 Bytes&lt;/strong&gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;int32_t&lt;/code&gt; for the &lt;em&gt;brush type&lt;/em&gt;, &lt;strong&gt;4 Bytes&lt;/strong&gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;int32_t&lt;/code&gt; for the &lt;em&gt;color&lt;/em&gt; of the line, and an other &lt;strong&gt;4 Bytes&lt;/strong&gt; “padding” which in all my files is zero.
Then follows the base &lt;em&gt;brush size&lt;/em&gt; in &lt;strong&gt;4 Bytes&lt;/strong&gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;float32_t&lt;/code&gt; aaaannd the &lt;em&gt;number of points&lt;/em&gt; inside the current &lt;em&gt;line&lt;/em&gt; as &lt;code class=&quot;highlighter-rouge&quot;&gt;int32_t&lt;/code&gt; (&lt;strong&gt;4 Bytes&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;Deducting from the file header &lt;code class=&quot;highlighter-rouge&quot;&gt;... with selections ...&lt;/code&gt;, I would bet the always-zero padding attribute &lt;em&gt;should&lt;/em&gt; likely correspond to &lt;em&gt;selected&lt;/em&gt; (yes/no) from the selection tool.
The selection tool (🜊) in the tablet’s GUI allows to select a list of complete lines from an intersection with a selected free form for move/scale/duplicate operations.
Anyway, this value is in all my files serialized as zero (maybe a bug) which corresponds to the observation that between closing and opening a file selections are not restored.&lt;/p&gt;

&lt;p&gt;Finally, &lt;em&gt;points&lt;/em&gt;:
You guessed it again, reading the next block of &lt;em&gt;points&lt;/em&gt; needs to be done in a loop as retrieved in the &lt;em&gt;number of points&lt;/em&gt; attribute of the current line.
A &lt;em&gt;point&lt;/em&gt; consists of five times &lt;strong&gt;4 Bytes&lt;/strong&gt; of &lt;code class=&quot;highlighter-rouge&quot;&gt;float32_t&lt;/code&gt; in the order of: X coordinate, Y coordinate, pen pressure, pen rotation to X axis, pen rotation to Y axis.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update v3:&lt;/em&gt; now &lt;code class=&quot;highlighter-rouge&quot;&gt;x&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;y&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;speed&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;direction&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;width&lt;/code&gt;, and &lt;code class=&quot;highlighter-rouge&quot;&gt;pressure&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;… and that is it!&lt;/p&gt;

&lt;h2 id=&quot;magic-numbers--ranges&quot;&gt;Magic Numbers &amp;amp; Ranges&lt;/h2&gt;

&lt;p&gt;The integers in the file format for types can take certain magic numbers mapping them to implemented functionality.
Floating point attributes have ranges (and units).&lt;/p&gt;

&lt;h3 id=&quot;line-attributes&quot;&gt;Line Attributes&lt;/h3&gt;

&lt;p&gt;The display seems to support a single shade of gray and black.
Since lines can be drawn on top of each other, this makes three &lt;strong&gt;colors&lt;/strong&gt; (including white lines):
&lt;img src=&quot;/blog/assets/reMarkable/2017_12_21_enums_colors.png&quot; alt=&quot;reMarkable .rm: colors&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;brush types&lt;/strong&gt; selectable in the GUI are represented as:
&lt;img src=&quot;/blog/assets/reMarkable/2017_12_21_enums_brush_types.png&quot; alt=&quot;reMarkable .rm: brush type&quot; /&gt;&lt;/p&gt;

&lt;p&gt;While the &lt;strong&gt;base brush size&lt;/strong&gt; can vary between the following values:
&lt;img src=&quot;/blog/assets/reMarkable/2017_12_21_enums_brush_size.png&quot; alt=&quot;reMarkable .rm: brush base size&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;point-attributes&quot;&gt;Point Attributes&lt;/h3&gt;

&lt;p&gt;Remarkably, &lt;strong&gt;coordinates&lt;/strong&gt; are stored as &lt;code class=&quot;highlighter-rouge&quot;&gt;float32_t&lt;/code&gt; instead of a possible representation in &lt;code class=&quot;highlighter-rouge&quot;&gt;int&lt;/code&gt; (e.g. even &lt;code class=&quot;highlighter-rouge&quot;&gt;int16_t&lt;/code&gt;!).
This probably just saves some type conversion during the rendering or might originate from the representation in the touch driver.
Nevertheless, from the values I saw it does not look too likely that the touch resolution is higher than the display resolution.
&lt;strong&gt;Coordinates&lt;/strong&gt; are withing the range of the resolution of the display: &lt;code class=&quot;highlighter-rouge&quot;&gt;0.0&lt;/code&gt; to &lt;code class=&quot;highlighter-rouge&quot;&gt;1404.&lt;/code&gt; for &lt;code class=&quot;highlighter-rouge&quot;&gt;X&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;0.0&lt;/code&gt; to &lt;code class=&quot;highlighter-rouge&quot;&gt;1872.&lt;/code&gt; for &lt;code class=&quot;highlighter-rouge&quot;&gt;Y&lt;/code&gt;:
&lt;img src=&quot;/blog/assets/reMarkable/2017_12_21_enums_coords.png&quot; alt=&quot;reMarkable .rm: coordinates&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;pressure&lt;/strong&gt; of drawing a certain &lt;em&gt;point&lt;/em&gt; can vary between zero and one:
&lt;img src=&quot;/blog/assets/reMarkable/2017_12_21_enums_pressure.png&quot; alt=&quot;reMarkable .rm: pressure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;pen rotation&lt;/strong&gt; is the most interesting attribute.
As in the sketch below, the rotation is given in Radian to the normal of the page for both the angle to X and Y axis.
The range can be in principle from minus Pi half to Pi half, although the maximum will unlikely be reached as the pen tip will not touch the surface if you try to hold it parallel to the surface ;)&lt;br /&gt;
Input validation fans take care: if a user rams the pen from the backside through the tablet and manages to draw a point with it, the full mathematical range from minus Pi to Pi for this input can be reached!
&lt;img src=&quot;/blog/assets/reMarkable/2017_12_21_enums_pen_rotation.png&quot; alt=&quot;reMarkable .rm: pen rotation&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Here is again the full cheat sheet for your &lt;code class=&quot;highlighter-rouge&quot;&gt;enum&lt;/code&gt; implementations :)
&lt;img src=&quot;/blog/assets/reMarkable/2017_12_21_reMarkable_binaryLines2.png&quot; alt=&quot;reMarkable .rm magic number cheat sheet&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;from-pen-to-paper&quot;&gt;From Pen to Paper&lt;/h2&gt;

&lt;p&gt;Now that we understand how each and every stroke on our tablet is stored we can ask the question: &lt;em&gt;What defines a rendered line?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Very similar to Gimp’s interface of drawing lines with pens, a rendered representation will now place “brushes” on each dot.
Brushes are partly-transparent PNGs that are placed on top of each other.
I guess the reMarkable is writing points with a constant sampling rate, which will make slowly drawn lines look continuous while fast strokes are reveling the beautiful structure of the selected brush type (try it with a nice big size!).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/reMarkable/stroke_speed_ok.png&quot; alt=&quot;reMarkable .rm rendering: stroke speed&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The interesting parts: of course, the brush PNG needs to be oriented during rendering.
Contrary to what one would guess for e.g. a stylograph (not implemented in the reMarkable), these are not rotated according to the pen’s rotation during the draw but to the tangents of two consecutive points during draw.
This gives a paint brush like orientation of the rendered structure of lines - for all available brushes…&lt;/p&gt;

&lt;p&gt;The actual width of a line assembles from four attributes.
Besides the brush type (PNG template) the pressure and the rotation to the surface determine the width of a line.&lt;/p&gt;

&lt;p&gt;Fun fact: The latter could actually be represented with only one attribute for the currently implemented brushes… so maybe we will see a calligraphy pen some time via an update? And by the way, what does brush type &lt;code class=&quot;highlighter-rouge&quot;&gt;6&lt;/code&gt; stand for? :)&lt;/p&gt;

&lt;p&gt;Fun fact 2: if you export a stroke via PDF (currently 1.4) the rotation of the PNG brushes is broken and always appears to be zero in all readers I tried (reported; seen in Gimp, Inkscape, Evince, Okular, …).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/blog/assets/reMarkable/stroke_speed_pdf_broken.png&quot; alt=&quot;reMarkable .rm rendering: PDF export bug&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;what-to-do-next&quot;&gt;What to Do Next?&lt;/h2&gt;

&lt;p&gt;We do now understand our own data, our very own files we wrote with our reMarkable tablet.
So what’s next and why to understand it anyway?&lt;/p&gt;

&lt;p&gt;For easier handling for the format, we should define its &lt;a href=&quot;http://blog.bfitz.us/?p=414&quot;&gt;formal grammar&lt;/a&gt; in a more sophisticated way than my writing above.
As good open source contributors, we can also add recognition of the file format to the &lt;code class=&quot;highlighter-rouge&quot;&gt;file&lt;/code&gt; command:&lt;/p&gt;

&lt;p&gt;Now:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;&lt;span class=&quot;w&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;kv&quot;&gt; myDrawing.rm
&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;myDrawing.rm: data&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Then:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;&lt;span class=&quot;w&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;kv&quot;&gt; myDrawing.rm
&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;myDrawing.rm: reMarkable tablet page (v3), 1404 x 1872, 4 layer(s)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;em&gt;Update 2018-07-25:&lt;/em&gt; Just put this in your &lt;code class=&quot;highlighter-rouge&quot;&gt;$HOME/.magic&lt;/code&gt; and it will add file recognition!&lt;br /&gt;
&lt;em&gt;Update 2018-07-26:&lt;/em&gt; Aaaaand… &lt;a href=&quot;https://github.com/file/file/commit/1b6cc8ebe1274211814c84afe3645f60c2afb677&quot;&gt;it’s mainline now&lt;/a&gt;, coming with &lt;code class=&quot;highlighter-rouge&quot;&gt;file&lt;/code&gt; v5.35 :-)&lt;br /&gt;
&lt;em&gt;Update 2019-02-09:&lt;/em&gt; Updated to &lt;a href=&quot;https://github.com/file/file/pull/53&quot;&gt;version 3&lt;/a&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;0       string  reMarkable
&amp;gt;11     string  .lines
&amp;gt;&amp;gt;18    string  file,
&amp;gt;&amp;gt;&amp;gt;24   string  version=
&amp;gt;&amp;gt;&amp;gt;&amp;gt;32  byte    x       reMarkable tablet page (v%c), 1404 x 1872,
&lt;span class=&quot;err&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;43 lelong  x       %d layer(s)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;We of course need an API in your favorite language for reading &amp;amp; writing &lt;code class=&quot;highlighter-rouge&quot;&gt;.rm&lt;/code&gt; files.
On top of such, we can write converters to &lt;em&gt;render&lt;/em&gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;.rm&lt;/code&gt; files, e.g. allowing to change brush types in post processing to add a stylograph brush type for writing as with &lt;a href=&quot;https://en.wikipedia.org/wiki/Calligraphy&quot;&gt;fancy dip pens&lt;/a&gt; :)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update 2017-12-29:&lt;/em&gt; Hey let’s just start right away.
Here is my little C++ file API and some first render examples to PNG: &lt;a href=&quot;https://github.com/ax3l/lines-are-beautiful&quot;&gt;lines-are-beautiful&lt;/a&gt;&lt;br /&gt;
&lt;em&gt;Update 2018-07-29:&lt;/em&gt; Also supports &lt;em&gt;writing&lt;/em&gt; &lt;code class=&quot;highlighter-rouge&quot;&gt;.lines&lt;/code&gt; (&lt;code class=&quot;highlighter-rouge&quot;&gt;.rm&lt;/code&gt;) files now.&lt;/p&gt;

&lt;p&gt;Also, we could with such converters improve exports - e.g. an exported PDF of the reMarkable tablet is easily 20 MB in size with the current vendor implementation and contains the bug described above.&lt;/p&gt;

&lt;p&gt;And we could add our own cloud backends, e.g. to upload the small binary files to our own &lt;a href=&quot;https://nextcloud.com/&quot;&gt;Nextcloud&lt;/a&gt; instances.&lt;/p&gt;

&lt;p&gt;You have more ideas or are already implementing some of the above?
Feel free to share it as well! :)
(See my public contact details in the footer of the page.)&lt;/p&gt;

&lt;h3 id=&quot;updates&quot;&gt;Updates&lt;/h3&gt;

&lt;p&gt;Just after publishing I found &lt;a href=&quot;https://www.reddit.com/r/RemarkableTablet/comments/7c5fh0/work_in_progress_format_of_the_lines_files/&quot;&gt;this reddit&lt;/a&gt;.
It seems the missing 4 Bytes could indeed be something from the select-and-transform tool.
Let’s see if we can get a non-zero value in there :)&lt;/p&gt;

&lt;p&gt;2017-12-29: I just got note that the &lt;a href=&quot;http://remarkablewiki.com/tech/filesystem&quot;&gt;reMarkable wiki&lt;/a&gt; and the &lt;a href=&quot;https://github.com/reHackable&quot;&gt;reHackable GitHub organization&lt;/a&gt; are also really far in their converters and file format documentations, including a working &lt;a href=&quot;https://github.com/reHackable/maxio/blob/master/tools/rM2svg&quot;&gt;.lines to svg converter&lt;/a&gt; for all strokes on the device!
Kudos, that’s great work everyone! :)&lt;/p&gt;

&lt;p&gt;2018-10-30: The latest update &lt;a href=&quot;https://blog.remarkable.com/big-software-update-convert-handwritten-text-revamped-pdf-export-and-much-more-b4a0256c2cc4&quot;&gt;just announced hand-writing detection, improved PDF export and beta SVG export&lt;/a&gt; :-)&lt;/p&gt;

&lt;p&gt;2018-09-24: I drafted an implementation in Rust: &lt;a href=&quot;https://github.com/ax3l/lines-are-rusty&quot;&gt;lines-are-rusty&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2019-02-09: The &lt;code class=&quot;highlighter-rouge&quot;&gt;.lines&lt;/code&gt; format has slightly changed to version 3 end of 2018.
Notebooks are now stored as one file per page, the file ending is &lt;code class=&quot;highlighter-rouge&quot;&gt;.rm&lt;/code&gt; and the points attributes are now: &lt;code class=&quot;highlighter-rouge&quot;&gt;x&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;y&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;speed&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;direction&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;width&lt;/code&gt;, and &lt;code class=&quot;highlighter-rouge&quot;&gt;pressure&lt;/code&gt;.
See &lt;a href=&quot;https://github.com/ax3l/lines-are-beautiful/pull/16&quot;&gt;this update&lt;/a&gt; (or &lt;a href=&quot;https://github.com/ax3l/lines-are-rusty/commit/a31c32efe05ac271074ac94a4ee6192cbed307e2&quot;&gt;that one&lt;/a&gt;).&lt;/p&gt;

&lt;h2 id=&quot;referral-program&quot;&gt;Referral Program&lt;/h2&gt;

&lt;p&gt;On Oct 4th, 2018 reMarkable started a program to get 85 Euro off and me 85 Euro cashback.
So let’s give this a try, here is my referrer link: &lt;a href=&quot;https://remarkable.mention-me.com/m/ol/dg6yc-axel-huebl&quot;&gt;buy a reMarkable tablet&lt;/a&gt; (affiliate link)&lt;/p&gt;

&lt;h2 id=&quot;version&quot;&gt;Version&lt;/h2&gt;

&lt;p&gt;“Codex”: 0.0.4.81&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;/etc/version&lt;/code&gt;: 20170911122159&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;&lt;span class=&quot;w&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;kv&quot;&gt; xochitl
&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;xochitl: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=0f8759a2e5ad62bb4f16d3b64a54e2bbef0ab271, stripped&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;</content><author><name></name></author><summary type="html">Happy holidays everyone!</summary></entry><entry><title type="html">Exploring the reMarkable via Shell</title><link href="https://plasma.ninja/blog/devices/remarkable/2017/12/18/reMarkable-exporation.html" rel="alternate" type="text/html" title="Exploring the reMarkable via Shell" /><published>2017-12-18T01:53:06+01:00</published><updated>2017-12-18T01:53:06+01:00</updated><id>https://plasma.ninja/blog/devices/remarkable/2017/12/18/reMarkable-exporation</id><content type="html" xml:base="https://plasma.ninja/blog/devices/remarkable/2017/12/18/reMarkable-exporation.html">&lt;script type=&quot;text/javascript&quot;&gt;
var thirdPartyLoaded = false;
function loadThirdParties()
{
    if( thirdPartyLoaded ) return;

    // youtube    
    var vid = document.getElementById('reMarkableVid');
    vid.src = 'https://www.youtube-nocookie.com/embed/zpUPpiV7gAo?rel=0';

    // twitter
    var twitterWidgets = document.createElement('script');
    twitterWidgets.charset = 'utf-8';
    twitterWidgets.src = 'https://platform.twitter.com/widgets.js';
    document.head.appendChild(twitterWidgets);

    thirdPartyLoaded = true;
}
&lt;/script&gt;

&lt;p&gt;&lt;button class=&quot;privacy-button&quot; title=&quot;This post contains a Youtube 'nocookie' video and two embedded Twitter tweets. They are not auto-loaded to protect your privacy.&quot; onclick=&quot;javascript:loadThirdParties();&quot;&gt;Load Youtube video and Twitter tweets.&lt;/button&gt; &lt;a href=&quot;/blog/about#privacy-policy&quot;&gt;[Privacy]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am using (and recommending) my reMarkable tablet for a few months now.
The display is just lovely, crisp and responsive and I am one of the few lucky ones receiving it in the first badges that came out.&lt;/p&gt;

&lt;iframe id=&quot;reMarkableVid&quot; width=&quot;560&quot; height=&quot;315&quot; src=&quot;&quot; frameborder=&quot;0&quot; gesture=&quot;media&quot; allow=&quot;encrypted-media&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;As a good user, I am not complaining (often) publicly about the bugs I stumbled up (and reported) and expect most of them to be fixed soon, even after 3 months without any software updates seen.
Just be aware that convenient data import/export is still a big problem for Android + Linux -only users, you will have to stick to plugging in a USB cable and using the (beta) web app.&lt;/p&gt;

&lt;p&gt;Anyway, one of the exciting features of the reMarkable is that it comes with a full running Linux (4.1.28) and enabled root SSH access - thanks to the GPL :)&lt;/p&gt;

&lt;blockquote class=&quot;twitter-tweet&quot; data-lang=&quot;en&quot; data-dnt=&quot;true&quot;&gt;
  &lt;p lang=&quot;tl&quot; dir=&quot;ltr&quot;&gt;Wuhu, nice! &lt;a href=&quot;https://twitter.com/hashtag/GPL&quot; data-dnt=&quot;true&quot;&gt;#GPL&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/Iamroot&quot; data-dnt=&quot;true&quot;&gt;#Iamroot&lt;/a&gt; &lt;a href=&quot;https://twitter.com/remarkablepaper&quot; data-dnt=&quot;true&quot;&gt;@remarkablepaper&lt;/a&gt; &lt;a href=&quot;https://t.co/XIJOQU4ak5&quot; data-dnt=&quot;true&quot;&gt;pic.twitter.com/XIJOQU4ak5&lt;/a&gt;&lt;/p&gt;&amp;mdash; Axel Huebl (@axccl) &lt;a href=&quot;https://twitter.com/axccl/status/917662236147175424&quot; data-dnt=&quot;true&quot;&gt;October 10, 2017&lt;/a&gt;
&lt;/blockquote&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;remarkable: ~/ cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 10 (v7l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
Hardware : Freescale i.MX6 SoloLite (Device Tree)

remarkable: ~/ uname -a
&lt;span class=&quot;err&quot;&gt;Linux remarkable 4.1.28-zero-gravitas-01897-g7f82abb869aa-dirty #256 Tue Sep 12 08:53:59 CEST 2017 armv7l GNU/Linux&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This blog post is exploring what we can do beyond the GUI-facing part of the device (e.g. to fix bugs and add missing features).&lt;/p&gt;

&lt;p&gt;I am not trying to reverse engineer the features in hardware and software that make this tablet superior to anything I saw on the market.
You can read more on that on HN by their CTO, which also contributed in the past to FOSS projects such as KDE.&lt;/p&gt;

&lt;p&gt;My primary interest is more usable data exchange and (way better) data archiving &amp;amp; meta data of my (scientific) work on it.
On a personal side node, I think it would increase the reMarkable’s market value if a documented API for efficient drawing and open file exchange (both accessing to their cloud and documenting the internal file formats) would be made public.
Especially the last aspect should be better sooner than later, since the created data of the user (hopefully is) and should never be relevant for their successful hardware project.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: This blog post might be updated on the go in the future.&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;home-structure&quot;&gt;Home Structure&lt;/h2&gt;

&lt;p&gt;If one first logs in one finds oneself as &lt;code class=&quot;highlighter-rouge&quot;&gt;uid=0&lt;/code&gt; (root) on &lt;code class=&quot;highlighter-rouge&quot;&gt;/home/root&lt;/code&gt;.
The first things to hop on are the &lt;a href=&quot;https://jackbergus.github.io/2017-11-09-hacking-reMarkable/&quot;&gt;directories and config files&lt;/a&gt; within it, &lt;code class=&quot;highlighter-rouge&quot;&gt;cat&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;less&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;vim&lt;/code&gt; are pre-installed.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;.config/&lt;/code&gt; for &lt;code class=&quot;highlighter-rouge&quot;&gt;xochitl&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;wifi pws&lt;/li&gt;
  &lt;li&gt;serial number&lt;/li&gt;
  &lt;li&gt;settings from UI&lt;/li&gt;
  &lt;li&gt;ssh login&lt;/li&gt;
  &lt;li&gt;left/right handed&lt;/li&gt;
  &lt;li&gt;last emails used for “share”&lt;/li&gt;
  &lt;li&gt;device token&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;.local/share/remarkable/xochitl/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Individual PDFs, epubs(?) and reMarkable notebooks&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;remarkable: ~/ ls /home/root/.local/share/remarkable/xochitl/
f434bd89-64ec-4071-ad75-806e5a951d93.cache/
f434bd89-64ec-4071-ad75-806e5a951d93.content
f434bd89-64ec-4071-ad75-806e5a951d93.highlights/
f434bd89-64ec-4071-ad75-806e5a951d93.lines
f434bd89-64ec-4071-ad75-806e5a951d93.lines.backup
f434bd89-64ec-4071-ad75-806e5a951d93.metadata
f434bd89-64ec-4071-ad75-806e5a951d93.pagedata
f434bd89-64ec-4071-ad75-806e5a951d93.thumbnails/

f4e2bd4e-c533-4fd0-a868-d63a1ff1ab1d.cache/
f4e2bd4e-c533-4fd0-a868-d63a1ff1ab1d.content
f4e2bd4e-c533-4fd0-a868-d63a1ff1ab1d.highlights/
f4e2bd4e-c533-4fd0-a868-d63a1ff1ab1d.lines
f4e2bd4e-c533-4fd0-a868-d63a1ff1ab1d.lines.backup
f4e2bd4e-c533-4fd0-a868-d63a1ff1ab1d.metadata
f4e2bd4e-c533-4fd0-a868-d63a1ff1ab1d.pagedata
f4e2bd4e-c533-4fd0-a868-d63a1ff1ab1d.pdf
&lt;span class=&quot;err&quot;&gt;f4e2bd4e-c533-4fd0-a868-d63a1ff1ab1d.thumbnails/&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Besides some json meta files, most of the files are some binary format.
Understanding these would be wonderful to truly control ones data!
Unfortunately, I have not seen anyone trying to document it yet.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update December 19th:&lt;/em&gt; ok, I decoded the &lt;code class=&quot;highlighter-rouge&quot;&gt;.lines&lt;/code&gt; file now :) A blog post will follow!&lt;br /&gt;
&lt;em&gt;Update December 26th:&lt;/em&gt; &lt;a href=&quot;/blog/devices/remarkable/binary/format/2017/12/26/reMarkable-lines-file-format.html&quot;&gt;and here the &lt;code class=&quot;highlighter-rouge&quot;&gt;.lines&lt;/code&gt; format is!&lt;/a&gt;&lt;/p&gt;

&lt;blockquote class=&quot;twitter-tweet&quot; data-lang=&quot;en&quot; data-dnt=&quot;true&quot;&gt;
  &lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;And nearly done. Layers identified and read :) &lt;a href=&quot;https://t.co/jeJSIzjN3H&quot; data-dnt=&quot;true&quot;&gt;pic.twitter.com/jeJSIzjN3H&lt;/a&gt;&lt;/p&gt;&amp;mdash; Axel Huebl (@axccl) &lt;a href=&quot;https://twitter.com/axccl/status/943258275902050304&quot; data-dnt=&quot;true&quot;&gt;December 19, 2017&lt;/a&gt;
&lt;/blockquote&gt;

&lt;p&gt;Last but not least, one can also add the usual Linux stuff.
For example just add your key to &lt;code class=&quot;highlighter-rouge&quot;&gt;.ssh/authorized_keys&lt;/code&gt; for pwless login.&lt;/p&gt;

&lt;h2 id=&quot;wifi-beyond-the-gui&quot;&gt;Wifi Beyond the GUI&lt;/h2&gt;

&lt;p&gt;By default, connecting to a WPA-EAP network (“WPA-Enterprise”) such as &lt;em&gt;Eduroam&lt;/em&gt; is not possible throughout the GUI.
This is especially bad for academic users.
Since wifi is controlled via the well-established “wpa supplicant” tool let us change this!&lt;/p&gt;

&lt;p&gt;Append to &lt;code class=&quot;highlighter-rouge&quot;&gt;/etc/wpa_supplicant/wpa_supplicant-wlan0.conf&lt;/code&gt; (example for TU Dresden):&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;network={
    ssid=&quot;eduroam&quot;
    key_mgmt=WPA-EAP
    eap=PEAP
    identity=&quot;sNumber@tu-dresden.de&quot;
    anonymous_identity=&quot;anonymous@tu-dresden.de&quot;
    password=&quot;YourPasswordHere&quot;
    ca_cert=&quot;/etc/wpa_supplicant/TUD-CACert.pem&quot;
    phase2=&quot;auth=MSCHAPV2&quot;
&lt;span class=&quot;err&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Add command line option to &lt;code class=&quot;highlighter-rouge&quot;&gt;/lib/systemd/system/wpa_supplicant@.service&lt;/code&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;[Service]
Type=simple
&lt;span class=&quot;err&quot;&gt;ExecStart=/usr/sbin/wpa_supplicant -C/var/run/wpa_supplicant -i%I&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;[Service]
Type=simple
ExecStart=/usr/sbin/wpa_supplicant -C/var/run/wpa_supplicant -i%I -c /etc/wpa_supplican
&lt;span class=&quot;err&quot;&gt;t/wpa_supplicant-wlan0.conf&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;It still does not auto-connect yet, but if you restart &lt;code class=&quot;highlighter-rouge&quot;&gt;wpa_supplicant&lt;/code&gt; it connects:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;systemctl daemon-reload
&lt;span class=&quot;err&quot;&gt;systemctl restart wpa_supplicant@wlan0.service&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;ul&gt;
  &lt;li&gt;https://tu-dresden.de/zih/dienste/service-katalog/arbeitsumgebung/zugang_datennetz&lt;/li&gt;
  &lt;li&gt;https://www.lrz.de/services/netz/mobil/802_1x/802_1x-linux/&lt;/li&gt;
  &lt;li&gt;https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/linux&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;templates&quot;&gt;Templates&lt;/h2&gt;

&lt;p&gt;The reMarkable supports drawing in up to five layers on PDFs and creating “notebooks” with individual “templates” as background.
Templates are straight PNGs parsed from a directory and the filename.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;remarkable: ~/ ls /usr/share/remarkable/templates/
Blank.png                 LS Week US.png            P Grid top.png
Isometric.png             LS Week.png               P Lined bottom.png
LS Checklist double.png   Notes.png                 P Lined heading.png
LS Checklist.png          P Black dots.png          P Lined top.png
LS Dayplanner.png         P Black grid.png          P Lines large.png
LS Dots bottom.png        P Black lines.png         P Lines medium.png
LS Dots top.png           P Black.png               P Lines small.png
LS Four storyboards.png   P Checklist.png           P Margin large.png
LS Grid bottom.png        P Cornell.png             P Margin medium.png
LS Grid margin large.png  P Day.png                 P Margin small.png
LS Grid margin med.png    P Dots S bottom.png       P One storyboard.png
LS Grid top.png           P Dots S top.png          P Two storyboards.png
LS Lines bottom.png       P Dots S.png              P US College.png
LS Lines medium.png       P Dots large.png          P US Legal.png
LS Lines small.png        P Four storyboards.png    P Week 2.png
LS Lines top.png          P Grid bottom.png         P Week US.png
LS Margin medium.png      P Grid large.png          P Week.png
LS Margin small.png       P Grid margin large.png   Perspective1.png
LS One storyboard 2.png   P Grid margin med.png     Perspective2.png
LS One storyboard.png     P Grid medium.png
&lt;span class=&quot;err&quot;&gt;LS Two storyboards.png    P Grid small.png&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;&lt;span class=&quot;err&quot;&gt;PNG image data, 1404 x 1873, 8-bit/color RGBA, non-interlaced&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;By adding two additional files I successfully added two new templates.
I added two landscape variants of the portrait &lt;code class=&quot;highlighter-rouge&quot;&gt;Notes.png&lt;/code&gt; with -33% and -50% line height.&lt;/p&gt;

&lt;p&gt;One good further thing could be a bullet journal template (if I ever understand how it actually works.)
What the template selection needs in general are thumbnails for faster loading and grouping by topic, which we can not influence at this point.
It is also worth noting that one can adjust the splash, sleep and empty battery &lt;a href=&quot;http://blog.lucafluri.ch/2017-11-21/customizing-remarkableTablet&quot;&gt;screens&lt;/a&gt; under &lt;code class=&quot;highlighter-rouge&quot;&gt;/usr/share/remarkable-shutdown&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id=&quot;xochitl&quot;&gt;xochitl&lt;/h2&gt;

&lt;p&gt;This is the main app of the reMarkable, which is started by &lt;code class=&quot;highlighter-rouge&quot;&gt;systemd&lt;/code&gt;.
Like all the (user-facing) software related to the product it is written in Qt 5.9.
Under &lt;a href=&quot;https://remarkable.engineering&quot;&gt;remarkable.engineering&lt;/a&gt; you can even find a pre-bundled SDK to develop your own apps.&lt;/p&gt;

&lt;p&gt;Realistically, you can already build and run other Qt apps that &lt;em&gt;view&lt;/em&gt; things, but drawing without reusing their own specially-crafted low-latency API &lt;a href=&quot;https://dragly.org/2017/12/01/developing-for-the-remarkable/index.html&quot;&gt;will not be fun&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Anyway, if one likes to dig deeper: checking the shipped libraries for Qt5 might be worth investigating for APIs in case they never will be documented:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;remarkable: ~/ ls /usr/lib/qt5/plugins/platforms/
&lt;span class=&quot;err&quot;&gt;libepaper.so      libqlinuxfb.so    libqminimal.so    libqoffscreen.so&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;From a first quick analyze of the app via &lt;code class=&quot;highlighter-rouge&quot;&gt;strace&lt;/code&gt; it might be a bit suboptimal that &lt;code class=&quot;highlighter-rouge&quot;&gt;xochitl&lt;/code&gt; calls &lt;code class=&quot;highlighter-rouge&quot;&gt;clock_gettime&lt;/code&gt; a dozen times a second and tries to access quite a few not-shipped library files during its usual execution.
Room for improvement I guess, especially for battery lifetime.&lt;/p&gt;

&lt;h3 id=&quot;web-ui-beta&quot;&gt;Web UI (Beta)&lt;/h3&gt;

&lt;p&gt;Allows to download all files as PDF and upload new files (PDF, epub) by just drag-and-dropping on the browser window.
This functionality is also part of &lt;code class=&quot;highlighter-rouge&quot;&gt;xochitl&lt;/code&gt; the same way as the file conversion is.
After enabling it in the settings page (rM - Storage - Enable USB web interface) and DHCP-ing the new USB ethN device it is reachable at http://10.11.99.1/&lt;/p&gt;

&lt;p&gt;I was always wondering why the PDFs via share and download are so extremely large for simple drawn notebook pages.
It turns out it is likely that the conversion to PDF is still rather hard-coded (&lt;code class=&quot;highlighter-rouge&quot;&gt;strace&lt;/code&gt; again) and uncompressed:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;&lt;span class=&quot;ni&quot;&gt;# &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;many&lt;/span&gt;&lt;span class=&quot;kv&quot;&gt; lines
&lt;/span&gt;1043  write(35, &quot;&amp;lt;&amp;lt;\n/Type /Pattern\n/PatternType 1&quot;..., 16168) = 16168

&lt;span class=&quot;ni&quot;&gt;# &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;few&lt;/span&gt;&lt;span class=&quot;kv&quot;&gt; lines
&lt;/span&gt;1043  write(35, &quot;/Pat24782 24782 0 R\n/Pat24783 24&quot;..., 16380) = 16380
&lt;span class=&quot;err&quot;&gt;1043  write(35, &quot;/Pat25601 25601 0 R\n/Pat25602 25&quot;..., 16380) = 16380&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This explains the dramatic size of the created PDFs (easily a dozen MB for a sketch).
It would actually be very nice if a cmd line tool and/or API exists for those conversions as well.&lt;/p&gt;

&lt;h2 id=&quot;other-apps&quot;&gt;Other apps&lt;/h2&gt;

&lt;p&gt;Other apps running by default (from &lt;code class=&quot;highlighter-rouge&quot;&gt;/usr/bin&lt;/code&gt;) are&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;update_engine&lt;/code&gt; (relatively quiet)&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;crashuploader&lt;/code&gt; in &lt;code class=&quot;highlighter-rouge&quot;&gt;/home/root&lt;/code&gt; (relatively active)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course, you never agreed to the crash collection and report uploading beforehand.
Ouch.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update 2018-01-05:&lt;/em&gt; Asked the support about &lt;code class=&quot;highlighter-rouge&quot;&gt;crashuploader&lt;/code&gt;.
They responded that “[t]he data collected contains no identifying data” and can be disabled in systemd via &lt;code class=&quot;highlighter-rouge&quot;&gt;systemctl disable crashuploader &amp;amp;&amp;amp; systemctl stop crashuploader&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Without analyzing the network traffic yet, it is still calming to see a public key in &lt;code class=&quot;highlighter-rouge&quot;&gt;/usr/share/update_engine/update-payload-key.pub.pem&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id=&quot;cross-compile&quot;&gt;Cross Compile&lt;/h2&gt;

&lt;p&gt;I did not use the SDK on their homepage yet but had good success using &lt;a href=&quot;https://github.com/dockcross/dockcross&quot;&gt;dockcross&lt;/a&gt; for &lt;code class=&quot;highlighter-rouge&quot;&gt;linux-armv7&lt;/code&gt;.
Compiling &lt;a href=&quot;https://github.com/fenrus75/powertop&quot;&gt;powertop&lt;/a&gt; with it two months ago I still fund no missing tunable besides &lt;code class=&quot;highlighter-rouge&quot;&gt;VM writeback timeout&lt;/code&gt; to improve battery life.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-docker&quot; data-lang=&quot;docker&quot;&gt;FROM dockcross/base:latest

# Add the cross compiler sources
RUN echo &quot;deb http://emdebian.org/tools/debian/ jessie main&quot; &amp;gt;&amp;gt; /etc/apt/sources.list &amp;amp;&amp;amp; \
  dpkg --add-architecture armhf &amp;amp;&amp;amp; \
  curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -

RUN apt-get update &amp;amp;&amp;amp; apt-get install -y \
  crossbuild-essential-armhf \
  gfortran-arm-linux-gnueabihf \
  qemu-user \
  qemu-user-static \
  libbz2-dev:armhf \
  libexpat1-dev:armhf \
  ncurses-dev:armhf \
  libssl-dev:armhf \
  libnl-3-dev:armhf \
  libnl-genl-3-dev:armhf \
  libnl-utils:armhf \
  libpci-dev:armhf \
  pkg-config:armhf \
  autoconf \
  autogen \
  autotools-dev \
  automake \
  libtool \
  autopoint \
  gettext

ENV CROSS_TRIPLE arm-linux-gnueabihf
ENV CROSS_ROOT /usr/${CROSS_TRIPLE}
ENV AS=/usr/bin/${CROSS_TRIPLE}-as \
    AR=/usr/bin/${CROSS_TRIPLE}-ar \
    CC=/usr/bin/${CROSS_TRIPLE}-gcc \
    CPP=/usr/bin/${CROSS_TRIPLE}-cpp-4.9 \
    CXX=/usr/bin/${CROSS_TRIPLE}-g++ \
    LD=/usr/bin/${CROSS_TRIPLE}-ld

# Tuned for reMarkable tablet:
#   Freescale i.MX6 SoloLite
#   ARM A9 CPU @1GHz (1 Core, Cortex A9)
#   model name : ARMv7 Processor rev 10 (v7l)
#   BogoMIPS : 48.00
#   Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
# evaluate:
#   -mslow-flash-data
#   -mfloat-abi=hard
ENV CFLAGS=&quot;-march=armv7-a -mtune=cortex-a9 -mfpu=neon -funsafe-math-optimizations -mthumb&quot; \
  CXXFLAGS=&quot;-march=armv7-a -mtune=cortex-a9 -mfpu=neon -funsafe-math-optimizations -mthumb&quot;

#ENV DEFAULT_DOCKCROSS_IMAGE dockcross/linux-armv7
ENV DEFAULT_DOCKCROSS_IMAGE linux-armv7

# Note: Toolchain file support is currently in debian Experimental:
# https://wiki.debian.org/CrossToolchains#In_jessie_.28Debian_8.29
COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/
ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake

# build examples
#   powertop
#   ./autogen.sh
#   ./configure LIBNL_CFLAGS=&quot;-I/usr/lib/arm-linux-gnueabihf/libnl3 -I/usr/include/libnl3&quot; LIBNL_LIBS=&quot;-L/usr/lib/arm-linux-gnueabihf -lnl-3 -lnl-genl-3&quot;
#   make&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Building more tools, &lt;a href=&quot;https://jackbergus.github.io/2017-11-09-hacking-reMarkable/&quot;&gt;it turns out&lt;/a&gt; that just installing a cross-compiler for ARM and a few multi-arch libs on Debian/Ubuntu is way easier:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;&lt;span class=&quot;ni&quot;&gt;# &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;kv&quot;&gt; multi-arch for &quot;armhf&quot;
&lt;/span&gt;&lt;span class=&quot;ni&quot;&gt;# &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;https://wiki.debian.org/Multiarch/HOWTO&lt;/span&gt;&lt;span class=&quot;kv&quot;&gt;
&lt;/span&gt;dpkg --add-architecture armhf
apt-get update

&lt;span class=&quot;ni&quot;&gt;# &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;install&lt;/span&gt;&lt;span class=&quot;kv&quot;&gt; C/C++ compiler and standard libs
&lt;/span&gt;apt-get install g++-arm-linux-gnueabihf gcc-arm-linux-gnueabihf
apt-get install libstdc++6:armhf libelf-dev:armhf

&lt;span class=&quot;ni&quot;&gt;# &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;compile&lt;/span&gt;&lt;span class=&quot;kv&quot;&gt; something
&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;arm-linux-gnueabihf-g++ main.cpp&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Then copy over the created executable (and the dynamic libraries from the armhf packages above which it might be missing during execution) to your reMarkable via &lt;code class=&quot;highlighter-rouge&quot;&gt;scp&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id=&quot;referral-program&quot;&gt;Referral Program&lt;/h2&gt;

&lt;p&gt;On Oct 4th, 2018 reMarkable started a program to get 85 Euro off and me 85 Euro cashback.
So let’s give this a try, here is my referrer link: &lt;a href=&quot;https://remarkable.mention-me.com/m/ol/dg6yc-axel-huebl&quot;&gt;buy a reMarkable tablet&lt;/a&gt; (affiliate link)&lt;/p&gt;

&lt;h2 id=&quot;version&quot;&gt;Version&lt;/h2&gt;

&lt;p&gt;“Codex”: 0.0.4.81&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;/etc/version&lt;/code&gt;: 20170911122159&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-console&quot; data-lang=&quot;console&quot;&gt;&lt;span class=&quot;w&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;kv&quot;&gt; xochitl
&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;xochitl: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=0f8759a2e5ad62bb4f16d3b64a54e2bbef0ab271, stripped&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;</content><author><name></name></author><summary type="html"></summary></entry></feed>