Jekyll2024-01-23T19:49:55-08:00https://stsykw.github.io/feed.xmlSatoshi Yukawa’s web sitepersonal descriptionSatoshi YukawaEuler Maclaurin formula2022-11-03T00:00:00-07:002022-11-03T00:00:00-07:00https://stsykw.github.io/posts/2022/11/EulerMaclaurin<h1 id="euler-maclaurin-formula">Euler-Maclaurin formula</h1>
<p>A note for the Euler-Maclaurin formula is posted on
<a href="https://gist.github.com/stsykw/f1a9e193e2740d405592867631e8a6a4">the page.</a>
The sum formula for half-integers, which is used in the calculation of Landau diamagnetism, is also shown.</p>Satoshi YukawaEuler-Maclaurin formulamathjax-bug2020-05-18T00:00:00-07:002020-05-18T00:00:00-07:00https://stsykw.github.io/posts/2020/05/mathjax-bug<h1 id="mathjax-bug">Mathjax bug?</h1>
<p>The following inline math is written as ‘A=a, b=B’: \(A = a, b=B\) <br />
But the CHTML renderer working in Microsoft Edge or Internet Explorer on Win 10 rendered as “A=A, b=b”. The SVG renderer works fine.
Which is this a bug of Mathjax or Microsoft?</p>
<p>(The default renderer in this page is SVG. The renderer can be selected by right click on the math expression.)</p>Satoshi YukawaMathjax bug? The following inline math is written as ‘A=a, b=B’: \(A = a, b=B\) But the CHTML renderer working in Microsoft Edge or Internet Explorer on Win 10 rendered as “A=A, b=b”. The SVG renderer works fine. Which is this a bug of Mathjax or Microsoft?地震研でLIGGGHTS2018-11-02T00:00:00-07:002018-11-02T00:00:00-07:00https://stsykw.github.io/posts/2018/11/eri-supercomputer<h1 id="地震研でliggghts">地震研でLIGGGHTS</h1>
<p><strong>注意: 実際の動作を保証するものではありません。特定の人物に向けて書いています。</strong></p>
<h2 id="ファイルの用意">ファイルの用意</h2>
<p>手元のコンピュータでインプットファイル、ジョブ実行スクリプト(下で説明)を準備する。
たとえばin.packing、job.sh。これを地震研に転送。下記の操作で地震研の計算機のホームディレクトリにコピーできる。</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>scp ./in.packing username@eic.eri.u-tokyo.ac.jp:~/
scp ./job.sh username@eic.eri.u-tokyo.ac.jp:~/
</code></pre></div></div>
<p>もちろん地震研の計算機でインプットファイル、ジョブ実行スクリプトを編集して用意しても良い。</p>
<h2 id="ログイン">ログイン</h2>
<p>地震研計算機にログイン</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ssh username@eic.eri.u-tokyo.ac.jp
</code></pre></div></div>
<h2 id="実行">実行</h2>
<p>用意したジョブ実行スクリプトを計算キューに投入する。
計算は、スクリプトを投入したディレクトリで実行される。</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>qsub job.sh
</code></pre></div></div>
<p>計算の様子を確認するには</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>qstat
</code></pre></div></div>
<p>この出力から自分のユーザー名、投入したジョブクラスを探す。</p>
<h2 id="ジョブ実行スクリプトの内容">ジョブ実行スクリプトの内容</h2>
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
<span class="c">#!/bin/bash </span>
<span class="c">#$ -jc B </span>
<span class="c">#$ -ac n=8 </span>
<span class="c">#$ -ac P=8 </span>
<span class="c">#$ -cwd </span>
<span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span>/home/yuk/local/lib/:<span class="nv">$LD_LIBRARY_PATH</span> mpiexec_mpt <span class="nt">-np</span> 8 dplace <span class="nt">-s1</span> /home/yuk/local/bin/liggghts_mpi < <span class="k">in</span>.packing
</code></pre></div></div>
<p>#から始まる行はコメントで一行目はスクリプトを実行するプログラム名を指定している。
変更する必要なし。<br />
二行目から四行目はジョブクラスと並列度を指定する。上の例は、Bクラス、8並列を指定している。
<a href="http://wwweic.eri.u-tokyo.ac.jp/computer/manual/eic2015/index.php?%E3%83%90%E3%83%83%E3%83%81%E3%82%B8%E3%83%A7%E3%83%96%EF%BC%88%E9%AB%98%E9%80%9F%E8%A8%88%E7%AE%97%E3%82%B5%E3%83%BC%E3%83%90%EF%BC%89">指定できる内容はここにある。</a> 当面はBクラスの8並列で大丈夫だと思うが、計算時間が足りなければ別のクラスの利用も考える。<br />
五行目はスクリプトを投入したディレクトリで実行するための指定。</p>
<p>LD…からはじまる行が実際の計算を実行している部分。
変更する必要があるのは、mpiexec_mptのあとにある-npの後ろの数字。これをジョブクラスの並列数をあわせる必要がある。またインプットファイルも変更する必要あり。</p>
<h2 id="計算結果を手元に">計算結果を手元に</h2>
<p>計算結果のファイルを手元に得るにはファイルを送り込んだscpの逆をすれば良いが、ファイル数が多いので先にまとめた方が簡単。<br />
ファイルをまとめる</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>tar cvfz test.tar.gz test test1 test3
</code></pre></div></div>
<p>test test1 test3 のファイルやディレクトリがtest.tar.gzという名前でまとめられる。まとめたファイルをscpで転送。
まとめたファイルをバラバラにするには</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>tar xvf test.tar.gz
</code></pre></div></div>Satoshi Yukawa地震研でLIGGGHTStest2017-01-01T00:00:00-08:002017-01-01T00:00:00-08:00https://stsykw.github.io/posts/2017/01/test<h1 id="test-post">test post</h1>Satoshi Yukawatest post