docker(42) FDPSをdockerで
https://qiita.com/kaizen_nagoya/items/f9eb041c284e5350f69e
言語間の比較
大きさ | step | time | |
---|---|---|---|
fortran | 4674984 | 40 | 1.217022 |
c++ | 671432 | 55 | 1.203732 |
c | 7146536 | 54 | 0.118091 |
原因などは未調査
#C
# cd ~/FDPS/sample/c/sph
# make
# ./sph.out
//==================================\\
|| ||
|| ::::::: ::::::. ::::::. .::::::. ||
|| :: :: : :: : :: ||
|| :::::: :: : ::::::' `:::::. ||
|| :: ::::::' :: `......' ||
|| Framework for Developing ||
|| Particle Simulator ||
|| Version 5.0e (2019/07) ||
\\==================================//
Home : https://github.com/fdps/fdps
E-mail : fdps-support@mail.jmlab.jp
Licence: MIT (see, https://github.com/FDPS/FDPS/blob/master/LICENSE)
Note : Please cite the following papers.
- Iwasawa et al. (2016, Publications of the Astronomical Society of Japan, 68, 54)
- Namekata et al. (2018, Publications of the Astronomical Society of Japan, 70, 70)
Copyright (C) 2015
Masaki Iwasawa, Ataru Tanikawa, Natsuki Hosono,
Keigo Nitadori, Takayuki Muranushi, Daisuke Namekata,
Kentaro Nomura, Junichiro Makino and many others
******** FDPS has successfully begun. ********
====================================
Paralleization infomation:
# of processes is 1
# of thread is 1
====================================
nptcl_glb(L) = 16384
nptcl_glb(L+R) = 24576
nptcl(L+R) = 24576
setup...completed!
eng = 2.9296961e-02
mom.x = -3.0718593e-20
mom.y = -9.9758304e-20
mom.z = -9.2773230e-20
================================
time = 0.0000000e+00
nstep = 0
================================
================================
time = 2.5160591e-03
nstep = 1
================================
================================
time = 4.8477307e-03
nstep = 2
================================
================================
time = 7.0385762e-03
nstep = 3
================================
================================
time = 9.1500033e-03
nstep = 4
================================
================================
time = 1.1209257e-02
nstep = 5
================================
================================
time = 1.3241066e-02
nstep = 6
================================
================================
time = 1.5261911e-02
nstep = 7
================================
================================
time = 1.7284106e-02
nstep = 8
================================
================================
time = 1.9318650e-02
nstep = 9
================================
eng = 2.9296501e-02
mom.x = 7.3427169e-20
mom.y = -3.3508808e-19
mom.z = -3.2449243e-19
================================
time = 2.1375321e-02
nstep = 10
================================
================================
time = 2.3463157e-02
nstep = 11
================================
================================
time = 2.5583571e-02
nstep = 12
================================
================================
time = 2.7686221e-02
nstep = 13
================================
================================
time = 2.9780576e-02
nstep = 14
================================
================================
time = 3.1870094e-02
nstep = 15
================================
================================
time = 3.3971428e-02
nstep = 16
================================
================================
time = 3.6085330e-02
nstep = 17
================================
================================
time = 3.8219504e-02
nstep = 18
================================
================================
time = 4.0382042e-02
nstep = 19
================================
eng = 2.9296525e-02
mom.x = 1.8552669e-19
mom.y = -3.2176139e-19
mom.z = -3.1963892e-19
================================
time = 4.2574803e-02
nstep = 20
================================
================================
time = 4.4787164e-02
nstep = 21
================================
================================
time = 4.6934902e-02
nstep = 22
================================
================================
time = 4.9097722e-02
nstep = 23
================================
================================
time = 5.1276360e-02
nstep = 24
================================
================================
time = 5.3446239e-02
nstep = 25
================================
================================
time = 5.5615052e-02
nstep = 26
================================
================================
time = 5.7789223e-02
nstep = 27
================================
================================
time = 5.9974154e-02
nstep = 28
================================
================================
time = 6.2176121e-02
nstep = 29
================================
eng = 2.9296538e-02
mom.x = -5.3317812e-18
mom.y = -2.6631814e-19
mom.z = -2.4452891e-19
================================
time = 6.4373197e-02
nstep = 30
================================
================================
time = 6.6566474e-02
nstep = 31
================================
================================
time = 6.8762657e-02
nstep = 32
================================
================================
time = 7.0968008e-02
nstep = 33
================================
================================
time = 7.3187441e-02
nstep = 34
================================
================================
time = 7.5426724e-02
nstep = 35
================================
================================
time = 7.7641040e-02
nstep = 36
================================
================================
time = 7.9856398e-02
nstep = 37
================================
================================
time = 8.2078777e-02
nstep = 38
================================
================================
time = 8.4313951e-02
nstep = 39
================================
eng = 2.9296550e-02
mom.x = 6.3932459e-19
mom.y = -2.1588134e-19
mom.z = -1.8290243e-19
================================
time = 8.6552963e-02
nstep = 40
================================
================================
time = 8.8785492e-02
nstep = 41
================================
================================
time = 9.1017697e-02
nstep = 42
================================
================================
time = 9.3255260e-02
nstep = 43
================================
================================
time = 9.5503733e-02
nstep = 44
================================
================================
time = 9.7759193e-02
nstep = 45
================================
================================
time = 1.0000741e-01
nstep = 46
================================
================================
time = 1.0225427e-01
nstep = 47
================================
================================
time = 1.0450535e-01
nstep = 48
================================
================================
time = 1.0676588e-01
nstep = 49
================================
eng = 2.9296556e-02
mom.x = 2.7970298e-17
mom.y = -1.8990882e-19
mom.z = -2.0084893e-19
================================
time = 1.0903549e-01
nstep = 50
================================
================================
time = 1.1129727e-01
nstep = 51
================================
================================
time = 1.1355701e-01
nstep = 52
================================
================================
time = 1.1582004e-01
nstep = 53
================================
================================
time = 1.1809149e-01
nstep = 54
================================
================================
time = 1.2037329e-01
nstep = 55
================================
******** FDPS has successfully finished. ********
#fortran
# cd ../../fortran/sph
# make
# ./sph.out
//==================================\\
|| ||
|| ::::::: ::::::. ::::::. .::::::. ||
|| :: :: : :: : :: ||
|| :::::: :: : ::::::' `:::::. ||
|| :: ::::::' :: `......' ||
|| Framework for Developing ||
|| Particle Simulator ||
|| Version 5.0e (2019/07) ||
\\==================================//
Home : https://github.com/fdps/fdps
E-mail : fdps-support@mail.jmlab.jp
Licence: MIT (see, https://github.com/FDPS/FDPS/blob/master/LICENSE)
Note : Please cite the following papers.
- Iwasawa et al. (2016, Publications of the Astronomical Society of Japan, 68, 54)
- Namekata et al. (2018, Publications of the Astronomical Society of Japan, 70, 70)
Copyright (C) 2015
Masaki Iwasawa, Ataru Tanikawa, Natsuki Hosono,
Keigo Nitadori, Takayuki Muranushi, Daisuke Namekata,
Kentaro Nomura, Junichiro Makino and many others
******** FDPS has successfully begun. ********
====================================
Paralleization infomation:
# of processes is 1
# of thread is 1
====================================
nptcl_glb(L) = 16384
nptcl_glb(L+R) = 24576
nptcl(L) = 16384
nptcl(L+R) = 24576
setup...
2.9300354178016894E-002
-7.9483785060220429E-021
-9.8166964299325573E-020
-9.3240199347243257E-020
================================
time = 0.0000000000000000E+000
nstep = 0
================================
================================
time = 3.0425553170226596E-003
nstep = 1
================================
================================
time = 6.0851106340453192E-003
nstep = 2
================================
================================
time = 9.1276659510679779E-003
nstep = 3
================================
================================
time = 1.2170221268090638E-002
nstep = 4
================================
================================
time = 1.5212776585113299E-002
nstep = 5
================================
================================
time = 1.8255331902135959E-002
nstep = 6
================================
================================
time = 2.1297887219158620E-002
nstep = 7
================================
================================
time = 2.4340442536181280E-002
nstep = 8
================================
================================
time = 2.7382997853203941E-002
nstep = 9
================================
2.9717855539801608E-002
-5.8726514768814753E-019
-1.0798366072925581E-018
-1.0256421928196761E-018
================================
time = 3.0425553170226601E-002
nstep = 10
================================
================================
time = 3.3468108487249258E-002
nstep = 11
================================
================================
time = 3.6510663804271919E-002
nstep = 12
================================
================================
time = 3.9553219121294579E-002
nstep = 13
================================
================================
time = 4.2595774438317240E-002
nstep = 14
================================
================================
time = 4.5638329755339900E-002
nstep = 15
================================
================================
time = 4.8680885072362561E-002
nstep = 16
================================
================================
time = 5.1723440389385221E-002
nstep = 17
================================
================================
time = 5.4765995706407881E-002
nstep = 18
================================
================================
time = 5.7808551023430542E-002
nstep = 19
================================
3.0831192504566011E-002
-1.1835961948898762E-019
-2.0615062502858302E-018
-1.9580441862921109E-018
================================
time = 6.0851106340453202E-002
nstep = 20
================================
================================
time = 6.3893661657475856E-002
nstep = 21
================================
================================
time = 6.6936216974498516E-002
nstep = 22
================================
================================
time = 6.9978772291521177E-002
nstep = 23
================================
================================
time = 7.3021327608543837E-002
nstep = 24
================================
================================
time = 7.6063882925566498E-002
nstep = 25
================================
================================
time = 7.9106438242589158E-002
nstep = 26
================================
================================
time = 8.2148993559611819E-002
nstep = 27
================================
================================
time = 8.5191548876634479E-002
nstep = 28
================================
================================
time = 8.8234104193657140E-002
nstep = 29
================================
3.2640365072304972E-002
2.8868471029202657E-018
-3.0431758932790802E-018
-2.8904461797646092E-018
================================
time = 9.1276659510679800E-002
nstep = 30
================================
================================
time = 9.4319214827702461E-002
nstep = 31
================================
================================
time = 9.7361770144725121E-002
nstep = 32
================================
================================
time = 1.0040432546174778E-001
nstep = 33
================================
================================
time = 1.0344688077877044E-001
nstep = 34
================================
================================
time = 1.0648943609579310E-001
nstep = 35
================================
================================
time = 1.0953199141281576E-001
nstep = 36
================================
================================
time = 1.1257454672983842E-001
nstep = 37
================================
================================
time = 1.1561710204686108E-001
nstep = 38
================================
================================
time = 1.1865965736388374E-001
nstep = 39
================================
3.5145373243019778E-002
-2.7597392212729173E-019
-4.0248455362722625E-018
-3.8228481732369415E-018
================================
time = 1.2170221268090640E-001
nstep = 40
================================
******** FDPS has successfully finished. ********
STOP 0
#c++
docker/ubuntu
# cd ../../c++/sph
# make
# ./sph.out
//==================================\\
|| ||
|| ::::::: ::::::. ::::::. .::::::. ||
|| :: :: : :: : :: ||
|| :::::: :: : ::::::' `:::::. ||
|| :: ::::::' :: `......' ||
|| Framework for Developing ||
|| Particle Simulator ||
|| Version 5.0e (2019/07) ||
\\==================================//
Home : https://github.com/fdps/fdps
E-mail : fdps-support@mail.jmlab.jp
Licence: MIT (see, https://github.com/FDPS/FDPS/blob/master/LICENSE)
Note : Please cite the following papers.
- Iwasawa et al. (2016, Publications of the Astronomical Society of Japan, 68, 54)
- Namekata et al. (2018, Publications of the Astronomical Society of Japan, 70, 70)
Copyright (C) 2015
Masaki Iwasawa, Ataru Tanikawa, Natsuki Hosono,
Keigo Nitadori, Takayuki Muranushi, Daisuke Namekata,
Kentaro Nomura, Junichiro Makino and many others
******** FDPS has successfully begun. ********
Directory "./result" is successfully made.
===========================================
This is a sample program of
Smoothed Particle Hydrodynamics on FDPS!
# of processes is 1
# of thread is 1
===========================================
# of ptcls is... 24576
setup...
================================
output result/0000.txt.
================================
================================
time = 0
step = 0
================================
2.9296961257496798e-02
-1.2913323337718453e-19
1.4394745585770889e-20
3.5704781719187464e-20
================================
time = 0.00251604
step = 1
================================
2.9296655973235823e-02
1.6284704719331456e-19
2.7777085427010403e-20
6.0349917635181465e-20
================================
time = 0.00484769
step = 2
================================
2.9296543999191585e-02
-2.4121910151026372e-19
4.2307758387603295e-20
8.1401195505851354e-20
================================
time = 0.00703851
step = 3
================================
2.9296483567029002e-02
-3.3993218883438187e-18
5.3641204353104476e-20
9.6751690089952942e-20
================================
time = 0.00914992
step = 4
================================
2.9296460206814406e-02
-1.2255507955585658e-20
6.4355040225516168e-20
1.0881832379512226e-19
================================
time = 0.0112092
step = 5
================================
2.9296453954319127e-02
-2.8186741855560954e-18
7.0407564207988708e-20
1.1666089120114541e-19
================================
time = 0.013241
step = 6
================================
2.9296457354419572e-02
5.0495339754973081e-18
7.7855280872171864e-20
1.2446413183858485e-19
================================
time = 0.0152618
step = 7
================================
2.9296466295206460e-02
-2.9896424920034556e-18
8.7244472218255473e-20
1.3336391178830201e-19
================================
time = 0.017284
step = 8
================================
2.9296478020337441e-02
3.0403188850509043e-19
9.5424372932334125e-20
1.4191016647158409e-19
================================
time = 0.0193185
step = 9
================================
2.9296490214379505e-02
-6.8268473268532455e-18
9.1729700956562978e-20
1.4023154306718265e-19
================================
output result/0010.txt.
================================
================================
time = 0.0213752
step = 10
================================
2.9296501081397079e-02
-7.4115382884751280e-21
8.3906448987531931e-20
1.3528248532417747e-19
================================
time = 0.023463
step = 11
================================
2.9296509238211373e-02
8.5100341419455487e-20
9.0728458970343609e-20
1.4050010814378545e-19
================================
time = 0.0255834
step = 12
================================
2.9296513890350460e-02
-6.0615795287885868e-21
9.9104158321001060e-20
1.4628609096530622e-19
================================
time = 0.027686
step = 13
================================
2.9296509915708251e-02
-1.1223715946711513e-18
9.9662452724243840e-20
1.4880050396089422e-19
================================
time = 0.0297804
step = 14
================================
2.9296506461626574e-02
-6.7109891015366182e-18
9.4544570610517930e-20
1.4548833469949631e-19
================================
time = 0.0318699
step = 15
================================
2.9296503568071865e-02
6.1036400085756832e-18
9.2201551315425820e-20
1.4015473127246907e-19
================================
time = 0.0339712
step = 16
================================
2.9296502352286299e-02
4.2581934445249780e-19
9.5215843842859266e-20
1.3965069540258412e-19
================================
time = 0.0360851
step = 17
================================
2.9296503794310539e-02
-7.9818296899936874e-18
9.0903025476813088e-20
1.3643507812370283e-19
================================
time = 0.0382193
step = 18
================================
2.9296508668072950e-02
4.4419731242995595e-18
8.6290838761261816e-20
1.3385708859499483e-19
================================
time = 0.0403818
step = 19
================================
2.9296516200394383e-02
2.2593200969689572e-17
8.4549805440261468e-20
1.3411541770449794e-19
================================
output result/0020.txt.
================================
================================
time = 0.0425746
step = 20
================================
2.9296524759173062e-02
8.6802348247844597e-19
8.4128644484442532e-20
1.3250796722874641e-19
================================
time = 0.0447869
step = 21
================================
2.9296531761415560e-02
7.4570398396104449e-18
8.4755214460004014e-20
1.3553802821008535e-19
================================
time = 0.0469347
step = 22
================================
2.9296529538183839e-02
8.4120694876396685e-18
8.7915606696886324e-20
1.4568066282947866e-19
================================
time = 0.0490975
step = 23
================================
2.9296531432474848e-02
-4.7039974725767569e-17
8.9881667516497797e-20
1.5289724039437947e-19
================================
time = 0.0512761
step = 24
================================
2.9296531392628909e-02
-2.0369554194689821e-18
8.6657770828243499e-20
1.5504573251751415e-19
================================
time = 0.053446
step = 25
================================
2.9296529940614036e-02
-2.0818137549599778e-17
9.0951057862807928e-20
1.5994578692087289e-19
================================
time = 0.0556148
step = 26
================================
2.9296529217435523e-02
1.1972016616051484e-18
1.0306245219486752e-19
1.7073521544676902e-19
================================
time = 0.057789
step = 27
================================
2.9296530530913179e-02
-2.1689337405630428e-19
1.0933140083259017e-19
1.7781267425831356e-19
================================
time = 0.0599739
step = 28
================================
2.9296533014964526e-02
2.7438044139526958e-18
1.0990784150704062e-19
1.7858223468985942e-19
================================
time = 0.0621759
step = 29
================================
2.9296536396690838e-02
2.8187668297847013e-19
1.0981298438448656e-19
1.7691041790668872e-19
================================
output result/0030.txt.
================================
================================
time = 0.0643729
step = 30
================================
2.9296538073947238e-02
1.6223883783251657e-17
1.1033408492970237e-19
1.7336363512090196e-19
================================
time = 0.0665662
step = 31
================================
2.9296539679035980e-02
-8.1949643553465507e-18
1.1935616253773108e-19
1.8067855281675689e-19
================================
time = 0.0687624
step = 32
================================
2.9296541392896145e-02
-2.3338960540187780e-17
1.3619876829650461e-19
1.9429154046996871e-19
================================
time = 0.0709677
step = 33
================================
2.9296543209459420e-02
-1.1956531794984492e-17
1.5231107555585260e-19
2.0077207739175165e-19
================================
time = 0.0731872
step = 34
================================
2.9296544360059018e-02
-6.4118276524782400e-18
1.6282474966324929e-19
2.0634377159468581e-19
================================
time = 0.0754265
step = 35
================================
2.9296544863520325e-02
2.1390943580180499e-17
1.6695798556698179e-19
2.1282001595274406e-19
================================
time = 0.0776408
step = 36
================================
2.9296543403768638e-02
6.0730938829153249e-18
1.7411911438942705e-19
2.1832955997899862e-19
================================
time = 0.0798561
step = 37
================================
2.9296544054394393e-02
-7.2499667537863702e-18
1.7603963030298106e-19
2.1794940078652936e-19
================================
time = 0.0820785
step = 38
================================
2.9296545625688238e-02
-1.0927254415172508e-18
1.6799891417236730e-19
2.1032743789586526e-19
================================
time = 0.0843137
step = 39
================================
2.9296547909523137e-02
9.1576437696806647e-18
1.6603905078990692e-19
2.0530345805072044e-19
================================
output result/0040.txt.
================================
================================
time = 0.0865527
step = 40
================================
2.9296549631632106e-02
9.0270154073462906e-18
1.6531548344249154e-19
2.0145784910619738e-19
================================
time = 0.0887852
step = 41
================================
2.9296550351052806e-02
1.1432350749532088e-17
1.6678675966768700e-19
2.0042398763141611e-19
================================
time = 0.0910174
step = 42
================================
2.9296550871317075e-02
-1.3859576599448489e-18
1.7074263744075794e-19
2.0401600855984980e-19
================================
time = 0.093255
step = 43
================================
2.9296550498869773e-02
6.1026076871712170e-19
1.6956256129704076e-19
2.0409021630324127e-19
================================
time = 0.0955034
step = 44
================================
2.9296550843589078e-02
3.3675912400462846e-18
1.6788443115610507e-19
2.0535377728452891e-19
================================
time = 0.0977589
step = 45
================================
2.9296551685021318e-02
8.3997610401248795e-18
1.6606392790217669e-19
2.0747097501426938e-19
================================
time = 0.100007
step = 46
================================
2.9296552327971057e-02
-1.7766621947777356e-17
1.6485262784103787e-19
2.0758070491557570e-19
================================
time = 0.102254
step = 47
================================
2.9296553379291181e-02
-1.9308857186490624e-17
1.7196460209448907e-19
2.1711694094885828e-19
================================
time = 0.104505
step = 48
================================
2.9296554430144128e-02
4.8053237888920526e-18
1.7418665122762308e-19
2.2286349650735767e-19
================================
time = 0.106766
step = 49
================================
2.9296555472390493e-02
-5.2788152064072065e-18
1.6855808403310607e-19
2.1963025089313064e-19
================================
output result/0050.txt.
================================
================================
time = 0.109035
step = 50
================================
2.9296556263828381e-02
1.2805841143284538e-17
1.6845397438934910e-19
2.1936420368379209e-19
================================
time = 0.111297
step = 51
================================
2.9296555838769323e-02
-2.8523040405400513e-18
1.7249525805695079e-19
2.2121419694915454e-19
================================
time = 0.113557
step = 52
================================
2.9296555596458596e-02
8.3750382659768946e-20
1.7963110802530648e-19
2.2639121858880603e-19
================================
time = 0.11582
step = 53
================================
2.9296556040023042e-02
6.9097242067861584e-18
1.8406449576240357e-19
2.3142524320316358e-19
================================
time = 0.118091
step = 54
================================
2.9296556964587862e-02
-8.3748265077400810e-18
1.8281779911282877e-19
2.3096539739591856e-19
******** FDPS has successfully finished. ********
大きさの比較
# ls -al sph.out
-rwxr-xr-x 1 root root 671432 Aug 13 14:29 sph.out
# ls -al ../../c/sph/sph.out
-rwxr-xr-x 1 root root 7146536 Aug 13 14:19 ../../c/sph/sph.out
# ls -al ../../fortran/sph/sph.out
-rwxr-xr-x 1 root root 4674984 Aug 13 14:25 ../../fortran/sph/sph.out
最後までおよみいただきありがとうございました。
いいね 💚、フォローをお願いします。
Thank you very much for reading to the last sentence.
Please press the like icon 💚 and follow me for your happy life.