計算物理学 Rubin H. Landau 参考文献・docker登録
https://qiita.com/kaizen_nagoya/items/af924f5ac71ff5cc8c89
<この記事は書きかけです。順次追記します。>
anaconda公式にgfortran, clangを入れた。
javaがうまく入っていない。
今日のdocker error: java E: Sub-process /usr/bin/dpkg returned an error code (1)
https://qiita.com/kaizen_nagoya/items/d0d890c6bdf455c66087
素のubuntuに最初にjavaを入れ、それからpython, gfortran, clangを入れることにした。
$ docker run -v /Users/administrator/Downloads/work:/home/work -p 8080:8080 -p 6006:6006 -it ubuntu /bin/bash
# apt update; apt -y upgrade
# apt install -y openjdk-11-jre
...
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode
Setting up openjdk-11-jre:amd64 (11.0.4+11-1ubuntu2~18.04.3) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for ca-certificates (20180409) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
done.
# apt install -y python3 gfortran clang
# apt -y install sudo vim wget curl apt-utils
# cd cp
# vi mkall.sh
# chmod +x mkall.sh
# vi wgeturl.sh
# chmod +x wgeturl.sh
# ./mkall
# cd HCPCodes
# gfortran tune.f90
# ./a.out
1 1.00000 0.30350 1.00000
2 0.92179 0.05728 0.95690
3 0.91720 0.01562 0.96664
4 0.91691 0.00402 0.96348
5 0.91688 0.00116 0.96414
6 0.91688 0.00031 0.96391
7 0.91688 0.00009 0.96397
8 0.91688 0.00002 0.96395
9 0.91688 0.00001 0.96395
10 0.91688 0.00000 0.96395
11 0.91688 0.00000 0.96395
Tune.pyはpython2みたい。
# curl -kL https://bootstrap.pypa.io/get-pip.py | python
# pip install numpy
# python Tune.py
iter ener err
1 1.0000000 0.3034969
2 0.9217880 0.0572816
3 0.9171967 0.0156207
4 0.9169062 0.0040152
5 0.9168841 0.0011571
6 0.9168824 0.0003081
7 0.9168823 0.0000879
8 0.9168823 0.0000238
9 0.9168823 0.0000067
10 0.9168823 0.0000018
11 0.9168823 0.0000005
time = 0:00:00.446073
# python Tune.py
iter ener err
1 1.0000000 0.3034969
2 0.9217880 0.0572816
3 0.9171967 0.0156207
4 0.9169062 0.0040152
5 0.9168841 0.0011571
6 0.9168824 0.0003081
7 0.9168823 0.0000879
8 0.9168823 0.0000238
9 0.9168823 0.0000067
10 0.9168823 0.0000018
11 0.9168823 0.0000005
time = 0:00:00.912752
# python Tune4.py
iter ener err
1 1.0000000000000 0.3034968741713
2 0.9217879630894 0.0572816058937
3 0.9171967206785 0.0156206559094
4 0.9169061568314 0.0040152363071
5 0.9168840734364 0.0011570750201
6 0.9168824011436 0.0003081087796
7 0.9168822729823 0.0000879027426
8 0.9168822631487 0.0000238206732
9 0.9168822623927 0.0000067257809
10 0.9168822623345 0.0000018408264
11 0.9168822623301 0.0000005162121
time = 0:00:00.374136
press a key to finish
#
次はjava
# javac Tune.java
# java Tune
iter, ener, err 1, 1.0, 0.30349687417131377
iter, ener, err 2, 0.9217879630894489, 0.057281605893659764
iter, ener, err 3, 0.9171967206784624, 0.015620655909443577
iter, ener, err 4, 0.916906156831372, 0.004015236307075396
iter, ener, err 5, 0.916884073436363, 0.001157075020072965
iter, ener, err 6, 0.9168824011436347, 3.081087796206207E-4
iter, ener, err 7, 0.9168822729822912, 8.790274264091292E-5
iter, ener, err 8, 0.916882263148663, 2.3820673234082298E-5
iter, ener, err 9, 0.916882262392699, 6.725780904371186E-6
iter, ener, err 10, 0.9168822623345422, 1.8408264145016992E-6
iter, ener, err 11, 0.9168822623300655, 5.162121422381089E-7
time = 2.579s
# javac Tune4.java
# java Tune4
iter, ener, err 1, 1.0, 0.30349687417131377
iter, ener, err 2, 0.9217879630894491, 0.05728160589365974
iter, ener, err 3, 0.9171967206784624, 0.015620655909443597
iter, ener, err 4, 0.9169061568313721, 0.0040152363070754165
iter, ener, err 5, 0.9168840734363629, 0.0011570750200729687
iter, ener, err 6, 0.9168824011436348, 3.081087796206415E-4
iter, ener, err 7, 0.9168822729822913, 8.790274264093162E-5
iter, ener, err 8, 0.9168822631486631, 2.3820673234143386E-5
iter, ener, err 9, 0.916882262392699, 6.725780904342688E-6
iter, ener, err 10, 0.9168822623345422, 1.8408264144934328E-6
iter, ener, err 11, 0.9168822623300655, 5.162121422150938E-7
time = 1.506s
# apt install -y openjdk-11-jdk
# javac Tune.java
# java Tune
iter, ener, err 1, 1.0, 0.30349687417131377
iter, ener, err 2, 0.9217879630894489, 0.057281605893659764
iter, ener, err 3, 0.9171967206784624, 0.015620655909443577
iter, ener, err 4, 0.916906156831372, 0.004015236307075396
iter, ener, err 5, 0.916884073436363, 0.001157075020072965
iter, ener, err 6, 0.9168824011436347, 3.081087796206207E-4
iter, ener, err 7, 0.9168822729822912, 8.790274264091292E-5
iter, ener, err 8, 0.916882263148663, 2.3820673234082298E-5
iter, ener, err 9, 0.916882262392699, 6.725780904371186E-6
iter, ener, err 10, 0.9168822623345422, 1.8408264145016992E-6
iter, ener, err 11, 0.9168822623300655, 5.162121422381089E-7
time = 2.141s
#docke hub登録
$ docker commit 9daf9f75e132 kaizenjapan/comp-physics
sha256:d00b10f37173deadf85a7efa7f81468a9e57f738577108fdeb26b556e9ab7035
$ docker push kaizenjapan/comp-physics
The push refers to repository [docker.io/kaizenjapan/comp-physics]
62cfff8524f5: Pushed
b079b3fa8d1b: Mounted from kaizenjapan/fortran
a31dbd3063d7: Mounted from kaizenjapan/fortran
c56e09e1bd18: Mounted from kaizenjapan/fortran
543791078bdb: Mounted from kaizenjapan/fortran
latest: digest: sha256:2a92ae0b0140faaea823f7b46fa9a7e1e16c85c1e73d5fd9022e56e1cbbf684f size: 1365
利用方法
$ docker run -v /Users/administrator/Downloads/work:/home/work -p 8080:8080 -it kaizenjapan/comp-physics /bin/bash
administratorは、ユーザ名。Downloadsの下にworkがあることが前提。
host OSで作成したファイルを置いておけば、そのままdocker でも利用できる。
docker hubに登録する際には、別のフォルダにcpしてからpushする。
物理記事 上位100
https://qiita.com/kaizen_nagoya/items/66e90fe31fbe3facc6ff
数学関連記事100
https://qiita.com/kaizen_nagoya/items/d8dadb49a6397e854c6d
プログラマが知っていると良い「公序良俗」
https://qiita.com/kaizen_nagoya/items/9fe7c0dfac2fbd77a945
一覧の一覧( The directory of directories of mine.) Qiita(100)
https://qiita.com/kaizen_nagoya/items/7eb0e006543886138f39
小川清最終講義、小川清最終講義(再)計画, Ethernet(100) 英語(100) 安全(100)
https://qiita.com/kaizen_nagoya/items/e2df642e3951e35e6a53
<この記事は個人の過去の経験に基づく個人の感想です。現在所属する組織、業務とは関係がありません。>
This article is an individual impression based on the individual's experience. It has nothing to do with the organization or business to which I currently belong.
文書履歴(document history)
ver. 0.01初稿 20190808
ver. 0.02 ありがとう追記 20230527
最後までおよみいただきありがとうございました。
いいね 💚、フォローをお願いします。
Thank you very much for reading to the last sentence.
Please press the like icon 💚 and follow me for your happy life.
http://bit.ly/45zG90s