ALPS と量子多体問題 ② - 計算物質科学イニシアティブ

CMSI計算科学技術特論C (2015/10/08)
ALPS と量子多体問題 ②
藤堂眞治
東京大学大学院理学系研究科 / 物性研究所 / NIMS
wistaria@phys.s.u-tokyo.ac.jp
「ALPS と量子多体問題」Agenda (1/2)
• CMSI計算科学技術特論Cの全体像
• 対象と目標、講義項目、プログラム
• ALPS (Applications and Libraries for Physics Simulations) とは?
• 量子格子模型とは? 強相関量子多体系のためのシミュレーション手法
• ALPS の生まれた背景、歴史と活用事例
• ALPS の設計
• シミュレーションのワークフロー、ALPS階層構造
• XML / HDF5 による入出力
• C++言語のテンプレートとジェネリックアルゴリズム
• Pythonによる後処理・可視化
• アプリケーション・フレームワークとしての利用
2
「ALPS と量子多体問題」Agenda (2/2)
• ALPS の開発
• ALPLS開発の経緯と開発体制、ライセンスと「ビジネスモデル」
• オープンソースのツールの利用 (ビルドシステム、バージョン管理、バグ追跡、ド
キュメント作成、GUI・可視化)
• アプリケーション普及のために
• ユーザサポート (ドキュメント、講習会、ワークショップ)
• 公開と普及 (MateriApps と MateriApps LIVE!)
• プロジェクトの普及と継続に不可欠なものは?
3
ALPS の特徴
• 任意の格子 • XML フォーマットによる格子構造の定義
• ユニットセルの繰り返しによる格子生成
• 格子を任意の有限グラフ (頂点と辺の集合) として定義することも可能 • 任意のハミルトニアン (模型)
• XML フォーマットによる量子数、演算子の定義
• 数式によるハミルトニアンの定義 • 様々な最新の解法 (アプリケーション): ED、CMC、QMC、DMRG、DMFT • 全ての ALPS アプリケーションに共通の入力形式
• 汎用的な出力形式、Python による解析・グラフ作成ツール
4
ALPS の階層構造
tools
XML manipulation Python binding GUI
applications
MC
domain-specific
libraries
lattice model observables scheduler
numerics
QMC
random ublas
ED
DMRG
DMFT
iterative eigenvalue solver
Boost library
generic C++
C / Fortran
graph
serialization XML/XSLT
BLAS
LAPACK
MPI
5
ALPS のワークフロー
Lattice XML File
square lattice
Model XML File
H = J
Σ
< i,j >
Parameter File
LATTICE = "square lattice"
MODEL
= "spin"
L
= 16
Jxy
= 1
Jz
= 2
SWEEPS = 10000
THERMALIZATION = 1000
{
{
{
{
T
T
T
T
=
=
=
=
0.1
0.2
0.5
1.0
}
}
}
}
parameter2xml
tool
<LATTICES>
<LATTICE name="square lattice" dimension="2">
<PARAMETER name="a" default="1"/>
<BASIS><VECTOR>a 0</VECTOR><VECTOR>0 a</VECTOR></BASIS>
</LATTICE>
<UNITCELL name="simple2d" dimension="2">
<VERTEX/>
<EDGE>
<SOURCE vertex="1" offset="0 0"/>
<TARGET vertex="1" offset="0 1"/>
</EDGE>
<EDGE>
<SOURCE vertex="1" offset="0 0"/>
<TARGET vertex="1" offset="1 0"/>
</EDGE>
</UNITCELL>
<LATTICEGRAPH name="square lattice">
<FINITELATTICE>
<LATTICE ref="square lattice"/>
(0,1)
<EXTENT dimension="1" size="L"/>
<EXTENT dimension="2" size="L"/>
<BOUNDARY type="periodic"/>
</FINITELATTICE>
<UNITCELL ref="simple2d"/>
(0,0)
(1,0)
</LATTICEGRAPH>
</LATTICES>
Parameter XML File
application programs
[ S iz S jz + ( S i+ S j- + S i- S j+ )/ 2 ] - h
Σ
i
S iz
<MODELS>
<BASIS name="spin">
<SITEBASIS name="spin">
<PARAMETER name="local_S" default="1/2"/>
<QUANTUMNUMBER name="S" min="local_S" max="local_S"/>
<QUANTUMNUMBER name="Sz" min="-S" max="S"/>
<OPERATOR name="Sz" matrixelement="Sz"/>
<OPERATOR name="Splus" matrixelement="sqrt(S*(S+1)-Sz*(Sz+1))">
<CHANGE quantumnumber="Sz" change="1"/>
</OPERATOR>
<OPERATOR name="Sminus" matrixelement="sqrt(S*(S+1)-Sz*(Sz-1))">
<CHANGE quantumnumber="Sz" change="-1"/>
</OPERATOR>
</SITEBASIS>
</BASIS>
<HAMILTONIAN name="spin">
<PARAMETER name="J" default="1"/>
<PARAMETER name="h" default="0"/>
<BASIS ref="spin"/>
<SITETERM>
-h * Sz(i)
</SITETERM>
<BONDTERM source="i" target="j">
J * (Sz(i)*Sz(j) + (Splus(i)*Sminus(j)+Sminus(i)*Splus(j)))/2
</BONDTERM>
</HAMILTONIAN>
</MODELS>
Quantum Lattice Model
Quantum Monte Carlo
Exact Diagonalization
DMRG
DMFT
Python based evaluation tools
Plots
Outputs in HDF5 & XML
6
ALPS ライブラリ・フレームワークを使う利点
• エラーバーと自己相関時間の自動計算 (ALPS/alea) • 自動並列化 & ロードバランシング (ALPS/scheduler) • チェックポイント作成とリスタート機能 (ALPS/scheduler) • XML・HDF5形式による計算結果の自動出力とこれらを扱うツール • 入力パラメータの柔軟な扱い (ALPS/parameter)
• 擬似乱数生成器 (ALPS/random)
• 格子の容易な取扱い (ALPS/lattice)
• 量子ハミルトニアンの容易な取扱い (ALPS/model) • アプリケーションの「ALPS化」のチュートリアルを用意
7
CMSI計算科学技術特論C (2015/10/08)
ALPS 実行デモ
参考文献:
藤堂「“実験技術”としての量子多体系シミュレーションソフトウェア ALPS」
日本物理学会誌 70, 275-282 (2015)
藤堂・加藤「CMSIハンズオン 物質科学計算パッケージソフト MateriApps LIVE!」
http://www.slideshare.net/cms_initiative/20150902
CMSI計算科学技術特論C (2015/10/08)
ALPS の開発体制
ALPS の展開
• 上方展開 (大規模化・高性能化・並列化)
• 「大規模並列量子モンテカルロ法」(ALPS/looper) の高度化
• 高並列スケジューラ(ALPS/parapack)のハイブリッド多重並列化
• Fortran, C プログラムのための API 作成
• 下方展開
• 実験家・理論家による幅広い利用の促進
• Windows/Macintosh 用バイナリインストーラの開発
• ワークフロー・履歴管理システムとの統合
• GUI (グラフィカルユーザインターフェース)の開発
10
Windows、Mac OS X 用バイナリインストーラ
for Mac OS X
for Windows
11
ワークフロー・履歴管理システムとの統合
http://www.vistrails.org/
12
「公開ソフト」への長い道のり
• ソースコード
• ビルドシステム
• テストスイート
• チュートリアル
• Webページ
• ユーザサポート
• ライセンス
• アプリ名
• ロゴ
• ドキュメント
• 講習会、、、、、、
13
ALPS プロジェクトの規模
• 開発者: 約30人 (7ヶ国)
• ソースコードの行数
Measuring programming progress by lines of code is like
measuring aircraft building progress by weight. — Bill Gates
ALPS Libraries
ALPS Applications
examples, tutorials, tests
言語
C++
Python
C++
Fortran
C++
Fortran
Python
行数
148,000
13,000
94,000
11,000
34,000
16,000
1,000
• アプリケーションよりもライブラリの方が大きい
• サンプル、チュートリアル、テストもかなり大きな比重を占める
14
開発・サポート環境
• ソースコードの規模、開発体制が大きくなると今までの方法では破綻する
• 開発・サポートのためのツールを一から作りあげるのは非現実的
• フリーソフトウェアの利用
• ビルドシステム: CMake
• ソースコードの管理: Subversion
• プロジェクト管理・バグ追跡: Trac
• ドキュメント作成: MediaWiki
• メーリングリスト: Mailman
• Linux ワークステーションが1台あれば、あるいは web サービスを利用すれば、これ
らの環境を整えるのは現在では比較的容易
15
ビルドシステム
• CMake - http://www.cmake.org
• Makefileを生成するためのユーティリティー (configureスクリプトに対応)
• Windows の Visual C++ 用ソリューションファイル、Mac OS X の Xcode 用プ
ロジェクトファイルの生成も可能
• 設定は CMakeLists.txt に記述する
• テスト(CTest)やバイナリ配布(CPack)の機能もある
• ファイルの依存関係の自動検出
CMakeLists.txt
cmake
Makefile
make
実行ファイル
プログラム開発時に作成
ビルド・実行環境で行う
subversion でファイルを管理
PC, サーバ, スパコン等
16
VCS (Version Control System) によるソース管理
• Subversion - http://subversion.apache.org/
• 開発者が複数になると、ディレクトリ名やログファイルによ
るバージョン管理はすぐに破綻する
• ソースコードをサーバー上で一括管理
• ネットワーク経由でソースを check out/check in
• 更新毎に一意なバージョン番号を付与
• 全ての修正履歴を保存
• 複数人が同時に更新した場合に衝突を回避するしくみ
• ブランチ・マージ・タグ付けなどが可能
• 開発者が一人、公開の予定がない場合でも積極的に使うべき
• 東大理学部物理3年の講義「計算機実験」でもVCSを教えている
17
BTS (Bug Tracking System) の利用
• Trac - http://trac.edgewall.org/
• プロジェクト管理とバグ追跡のためのツール
• Web ブラウザからアクセス・操作
• 開発者の情報共有のための wiki
• Subversion との連携 (ソース、修正履歴の web 上での閲覧)
• プロジェクト管理 (ロードマップ、マイルストーンの管理)
• チケットシステム (issue 管理)
• バグやタスクの登録
• 担当者の決定
• 修正状況の追跡
18
Wiki によるマニュアル作成・管理
• MediaWiki - http://www.mediawiki.org/wiki/MediaWiki
• もともとはウィキペディアのために開発された
• Wiki とは?
• Webブラウザを利用してWeb文書を書き換えるシステム
• ネットワーク上のどこからでも書き換えができる。共同作業が容易
• Webブラウザがあれば編集作業が行える
• HTMLよりも簡潔な書式
• 文書間のリンクの作成が容易
• ALPS Wiki のコンテンツ
• ニュース、インストール方法、ALPSに関連する論文、発表資料、ライブラリリ
ファレンスマニュアル、チュートリアル
19
の利用
• git - https://git-scm.com
• 分散型バージョン管理システム
• Linux カーネルの開発に使うために開発された
• 近年、subversion の後継として普及が進んでいる
• GitHub - https://github.com
• git を核とした OSS 開発ポータル (例: MateriApps LIVE!)
• git + ソースコードブラウザ + wiki + issue 管理 + 統計 + リリースページ作成
• 無料 + 教育機関所属者は無料で非公開リポジトリを作成可 (GitHub Education)
• git & GitHub を使ってみたい人
CMSIハンズオン「バージョン管理システム」
• 神戸 & 柏で開催、CMSI web でも資料公開中
20
ALPS メーリングリスト
• Mailman - http://www.gnu.org/software/mailman/index.html
• 開発者メーリングリスト
• 1.7通/日 (2010年∼2014年)
• 開発方針に関する意見交換、リリーススケジュール調整、担当者調整
• Tracチケットの変更ログも自動的にここに流れる
• ユーザメーリングリスト
• 1.1通/日 (2010年∼2014年)
• Web からの自動登録
• 開発者 + ユーザコミュニティーによるサポートの場
• FAQ
Wiki ドキュメントへ
• バグレポート、要望など
Trac チケットへ
21
ワークショップ・講習会
• ALPS developers workshop
• 今後の開発方針についてブレインストーミング & ディスカッション
• ALPS users workshop
• アルゴリズムについてのレビュートーク
• Wiki のチュートリアルを用いて ALPS の実習
• ALPS ハンズオン (CMSI ハンズオン)
• 半日程度のチュートリアル
• とにかく ALPS を動かしてみることを目標に
22
ライセンス = ビジネスモデル
• ALPS Library License, ALPS Application License
• GNU General Public License (GPL) を基本としたライセンス
• Non-commercial academic use の場合自由に利用可能
• Commercial use の場合は要相談
• 自由に再配布可
• ユーザが変更を施したコードも同じライセンスの下で再配布可
• ALPSを用いた研究成果を公表する場合には acknowledgement と論文の引用が義
務 (ALPSをユーザーコードのテストのみに使った場合を含む)
1. In any scientific publication based wholly or in part on the Library,
the use of the Library must be acknowledged and the publications
listed in the accompanying CITATIONS.txt document must be cited.
23
ALPS 論文
• ALPS Library に関する論文
• B. Bauer et al. The ALPS project release 2.0: Open source software for strongly
correlated systems, J. Stat. Mech., P05001 (2011). • A. F. Albuquerque et al. The ALPS project release 1.3: open source software for
strongly correlated systems, J. Mag. Mag. Mat. 310, 1187 (2007). • F. Alet et al. The ALPS Project: Open Source Software for Strongly Correlated
Systems, J. Phys. Soc. Jpn. Suppl. 74, 30 (2005). • 加えて、ALPS Application ごとに引用文献が定められている
• 誰を(どこまで)アプリの著作者に含めるか? 論文の著者に含めるか?
•
永遠の課題
24
Department for Physics, Arnold Sommerfeld Center for Theoretical Physics
and Center for NanoScience, University of Munich, 80333 Munich, Germany
18 Microsoft Research, Station Q, University of California, Santa Barbara,
CA 93106, USA
19 Institute for Solid State Theory, RWTH Aachen University, 52056 Aachen,
Germany
20 Institut für Theoretische Physik III, Universität Stuttgart,
Pfaffenwaldring 57, 70550 Stuttgart, Germany
E-mail: troyer@comp-phys.org
17
ALPS 2.0 Paper
J
Received 23 December 2010
Accepted 15 March 2011
Published 4 May 2011
ournal of Statistical Mechanics: Theory and Experiment
Online at stacks.iop.org/JSTAT/2011/P05001
doi:10.1088/1742-5468/2011/05/P05001
J. Stat. Mech. (2011) P05001
Abstract. We present release 2.0 of the ALPS (Algorithms and Libraries
The ALPS project release 2.0: open
for Physics Simulations) project, an open source software project to develop
source software for strongly correlated
libraries and application programs for the simulation of strongly correlated
quantum lattice models such as quantum magnets, lattice bosons, and strongly
The ALPS project release
2.0: open
systems
correlated fermion systems. The code development is centered on common XML
and HDF5 data formats, libraries to simplify and speed up code development,
source software for strongly
correlated
systems
1
9,10
1
5
1
J. Stat. Mech. (2011) P050
B Bauer1, L D Carr2, H G Evertz3, A Feiguin4, J Freire5,
common evaluation and plotting tools, and simulation programs. The programs
S Fuchs6 , L Gamper1, J Gukelberger1, E Gull7, S Guertler8, enable non-experts to start carrying out serial or parallel numerical simulations
A Hehn1 , R Igarashi9,10, S V Isakov1 , D Koop5, P N Ma1,
by providing basic implementations of the important algorithms for quantum
P Mates1,5 , H Matsuo11, O Parcollet12, G Paw!lowski13 ,
lattice models: classical and quantum Monte Carlo (QMC) using non-local
J D Picon14, L Pollet1,15, E Santos5 , V W 1Scarola16,
2
3
4 simulations,
5 exact and full diagonalization (ED),
updates,
extended
ensemble
B
,
L
D
Carr
,
H
G
Evertz
,
A
Feiguin
,
J
Freire
,
17
5
1 Bauer 10,11
18
, S Trebst1 , the density matrix
U Schollwöck , C Silva , B Surer , S Todo
group (DMRG)
both in a static version and
6
1 renormalization
7
1
19,20
S Fuchs
L Gamper
, J Gukelberger , E Gull , S Guertler8,
and S,Wessel
M Troyer1,21, M L Wall2, P Werner
a dynamic time-evolving block decimation (TEBD) code, and quantum Monte
, R Igarashi , S
V Isakov
, Ddynamical
Koop , mean
P N field
Ma theory
,
A Hehn
Theoretische Physik, ETH Zurich, 8093 Zurich,
Switzerland
Carlo
solvers for
(DMFT). The ALPS libraries
1,5 CO 80401, USA 11
12
13
2 Department of Physics, Colorado School of Mines, Golden,
,
H
Matsuo
,
O
Parcollet
,
G
Paw!
l
owski
,
P
Mates
provide a powerful framework for programmers to develop their own applications,
3 Institut für Theoretische Physik, Technische Universität Graz, A-8010 Graz,
14
1,15
5
16
for instance,
simplify
E Santos
, V Wgreatly
Scarola
, the steps of porting a serial code onto a
J D Picon , L Pollet ,which,
Austria
17
5
1
10,11
18
4 Department of Physics and Astronomy, University of Wyoming, Laramie,
distributed
memory, machine.
B Surer
, S Todo
S TrebstMajor
, changes in release 2.0 include
U Schollwöck , C Silva ,parallel,
WY 82071, USA
of HDF5
for S
binary
data,19,20
evaluation tools in Python, support for the
1
, M L Wall2,the
P use
Werner
and
Wessel
MUniversity
Troyerof1,21
5 Scientific Computing and Imaging Institute,
Utah,
Windows operating system, the use of CMake as build system and binary
1 Theoretische Physik, ETH Zurich, 8093 Zurich, Switzerland
Salt Lake City, UT 84112, USA
installation packages for Mac OS X and Windows, and integration with the
6 Institut für Theoretische Physik, Georg-August-Universität Göttingen,
2 Department of Physics, Colorado School of Mines, Golden, CO 80401, USA
VisTrails workflow provenance tool. The software is available from our web server
Göttingen, Germany
3
für
Theoretische
Physik,
Universität Graz, A-8010 Graz,
7 Columbia University, New York, NY 10027, Institut
atTechnische
http://alps.comp-phys.org/.
USA
8 Bethe Center for Theoretical Physics, Universität
AustriaBonn, Nussallee 12,
4 Department of Physics and Astronomy, University of Wyoming, Laramie,
53115 Bonn, Germany
Keywords: density matrix renormalization group calculations, classical Monte
9 Center for Computational Science and e-Systems, Japan Atomic Energy
WY 82071, USA
Carlo simulations, quantum Monte Carlo simulations, quantum phase transitions
Agency, 110-0015 Tokyo, Japan
5 Scientific Computing and Imaging Institute, University of Utah,
(theory)
10 Core Research for Evolutional Science and Technology, Japan Science and
Salt Lake City, UT 84112, USA
Technology Agency, 332-0012 Kawaguchi, Japan
6 Institut für Theoretische Physik,ArXiv
11 Department of Applied Physics, University
ePrint: 1101.2646 Göttingen,
Georg-August-Universität
of Tokyo, 113-8656 Tokyo, Japan
12 Institut de Physique Théorique, CEA/DSM/IPhT-CNRS/URA 2306,
Göttingen, Germany
CEA-Saclay, F-91191 Gif-sur-Yvette, France7 Columbia University, New York, NY 10027, USA
13 Faculty of Physics, A Mickiewicz University, Umultowska 85, 61-614 Poznań,
25
8 Bethe Center for Theoretical Physics, Universität Bonn, Nussallee 12,
Poland
1
14
53115 Bonn, Germany
J. Stat. Mech. (2011) P05001
J. Stat. Mech. (2011) P05001
J
ournal of Statistical Mechanics: Theory and Experiment
The ALPS project release 2.0: open source software for strongly correlated systems
Contents
The ALPS project release 2.0: open source software for strongly correlated systems
1. Introduction
4
10.License
17
2. The ALPS project
2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2. New features in version 2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
5
6
11.Future development plans
18
3. Building and installing ALPS
3.1. Build system . . . . . . . .
3.2. Building ALPS from source
3.3. Binary installation packages
3.4. LiveALPS . . . . . . . . . .
.
.
.
.
6
6
6
7
7
4. Data formats
4.1. XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2. HDF5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
7
8
5. ALPS libraries
8
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
6. Evaluation tools in Python
9
6.1. The Python language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
6.2. The pyalps package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
7. Applications
7.1. Exact diagonalization . . . . . . . . . . . . . . . . . . . . . .
7.1.1. Sparse diagonalization code sparsediag. . . . . . . .
7.1.2. Full diagonalization code fulldiag. . . . . . . . . . .
7.2. Classical Monte Carlo simulations . . . . . . . . . . . . . . .
7.2.1. Classical Monte Carlo codes for spin models spinmc.
7.3. Quantum Monte Carlo simulations . . . . . . . . . . . . . .
7.3.1. The looper code. . . . . . . . . . . . . . . . . . . . .
7.3.2. The directed loop algorithm code dirloop sse. . . .
7.3.3. The worm algorithm code worm. . . . . . . . . . . . .
7.3.4. The extended ensemble code qwl. . . . . . . . . . . .
7.4. Density matrix renormalization group (DMRG) algorithms .
7.4.1. The dmrg code. . . . . . . . . . . . . . . . . . . . . .
7.4.2. Time-evolving block decimation code tebd. . . . . . .
7.5. Dynamical mean field theory QMC solvers dmft . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
10
11
11
11
11
11
12
12
12
12
12
12
12
12
13
8. Integration with the VisTrails workflow and computational provenance
tools
13
8.1. Computational provenance . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
8.2. The ALPS VisTrails package . . . . . . . . . . . . . . . . . . . . . . . . . . 14
9. Tutorials and examples
15
9.1. Tutorials on using the ALPS codes . . . . . . . . . . . . . . . . . . . . . . 15
9.2. Tutorials on writing codes with ALPS . . . . . . . . . . . . . . . . . . . . . 16
doi:10.1088/1742-5468/2011/05/P05001
3
19
Appendix A. Scientific workflows and VisTrails
A.1. Workflows . . . . . . . . . . . . . . . . . . .
A.2. Data provenance . . . . . . . . . . . . . . . .
A.3. Caching and persistent storage . . . . . . . .
A.4. Sharing content and reproducible research .
Appendix B. Python examples
Appendix C. ALPS installation
C.1. Prerequisites . . . . . . .
C.2. The CMake build system
C.3. Installation steps . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
20
20
20
23
24
24
with CMake
26
. . . . . . . . . . . . . . . . . . . . . . . . . 26
. . . . . . . . . . . . . . . . . . . . . . . . . 27
. . . . . . . . . . . . . . . . . . . . . . . . . 28
Appendix D. The ALPS XML schemas
29
D.1. Lattice definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
D.2. Model definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
References
33
1. Introduction
In this paper we present release 2.0 of the ALPS project (Algorithms and Libraries for
Physics Simulations), an open source software development project for strongly correlated
lattice models. This paper updates the publications on the previous releases [1, 2] to
include changes and new features in version 2.0.
Quantum fluctuations and competing interactions in quantum many-body systems
lead to unusual and exciting properties of strongly correlated materials such as quantum
magnetism, high temperature superconductivity, heavy fermion behavior, and topological
quantum order. The strong interactions make accurate analytical treatments hard and
direct numerical simulations are essential to increase our understanding of the unusual
properties of these systems.
The last two decades have seen tremendous progress in the development of algorithms,
including refinements to existing numerical algorithms, such as exact diagonalization [3],
the density matrix renormalization group [4]–[7] and (quantum) Monte Carlo (QMC)
techniques, as well as the advent of a new class of variational approaches based on tensor
network states [8]–[12]. Some of the algorithmic refinements have led to computational
speedups of many orders of magnitude, such as the development of non-local update
schemes [13, 14] in QMC methods [15]–[22], the sampling of extended ensembles [23]–[28],
or the continuous-time approach to quantum impurity problems [29]–[33]. These advances
often come at the cost of increased algorithmic complexity and challenge the current model
of program development in this research field. In contrast to other research areas, in which
large ‘community codes’ are being used, the field of strongly correlated systems has so
far been based mostly on single codes developed by individual researchers for particular
26
doi:10.1088/1742-5468/2011/05/P05001
4
J. Stat. Mech. (2011) P05001
.
.
.
.
J. Stat. Mech. (2011) P05001
.
.
.
.
Acknowledgments
CMSI計算科学技術特論C (2015/10/08)
アプリケーション普及のために
アプリケーション普及のための条件
• そもそも、なぜ普及させる必要があるのか?
• 「良いソフトウェア」を公開することは必須の条件、だが十分条件ではない
• 公開後もユーザに「関わり続ける」ことが重要
• ソフトが「生きている」と感じてもらう
• バグフィックス、機能追加、バージョンアップ
• ユーザーサポート、リアクション
• チュートリアル、事例紹介の充実
• 結局のところ、普及するかどうかはタイミングや運によるところが大きい
• それでも「打率」を上げることは可能
28
「公開アプリ」プロジェクトの立ち上げ
• 最初から「公開」を前提に立ち上げる
• 最初は小さく、素早く、簡潔に
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it. — Brian W. Kernighan
• 最初の三ヶ月で公開までもっていく
• お金を取ってくるなら、プロジェクトを立ち上げた後で
• シニア(40歳以上)やお金を持っている人抜きで始める
• 実際に書く(書ける)人だけでチームを組む
• アプリの「名前」や「ロゴ」は重要(かも)
29
開発・普及に役立つツールや仕組みの利用
• GitHub、SourceForge、SlideShare、YouTube
• MateriApps http://ma.cms-initiative.jp/
• MateriApps web
• MateriApps LIVE!
• MateriApps Installer
• MateriApps Cloud (coming soon?)
• コミュニティーによるサポート
• CMSIハンズオン開催サポート
• 物性研 ソフトウェア高度化プロジェクト
30
物性研ソフトウェア高度化 第1号: HΦ (エイチファイ)
• 並列計算機に対応した数値厳密対角化法による有効模
型ソルバーパッケージ。広汎な多体量子系の有効模型
(多軌道ハバード模型、ハイゼンベルグ模型、近藤格子
模型など)の基底状態及び低励起状態の波動関数を並
列計算によって求める。ランチョス法による基底状態
計算、熱的純粋量子状態を利用した比熱・帯磁率の温
度依存性計算が可能
• 開発代表: 山地洋平(東大院工)
• 2015/10/09 (明日!) 17:00 (JST) 公開予定
• MateriApps http://ma.cms-initiative.jp/ja/listapps/hphi
• GitHub https://github.com/QLMS/HPhi/releases
It always takes longer than you expect, even when you take
into account Hofstadter's Law. — Hofstadter's Law
31
a Portal to Materials Science Simulation
Computational Materials Science in Japan
S. Todo1,2, R. Igarashi2, S. Kasamatsu2, T. Kato2, N. Kawashima2, T. Kawatsu3, Y. Konishi2, H. Kouta2, H. Matsuo4, M. Noda5, S. Sasaki6,
Y. Terada7, S. Tsuchida6, K. Yoshimi2, K. Yoshizawa2 (MateriApps collaboration) (1UTokyo, 2ISSP, 3YCU, 4RIST, 5IMS, 6Ageha, 7IMR)
Current status and issues in Computational Materials Science
- Computational Materials Science Initiative
- Promoting cutting-edge researches
on wide topics ranging from strongly
correlated electrons, electric devices,
molecules to structural materials
From Users’ viewpoint:
- New algorithms should be implemented and used,
or it will be forgotten and lost
- “In-house” code will be left uncontrolled once the graduate
student or PostDoc leaves the group
- Costs too much to write and maintain the documents
- Development of software itself is hardly considered as
scientific achievements
- Little idea about potential “customers” and their needs
- State-of-the-art algorithms developed and optimized for massively
parallel supercomputers: the K computer, HPCI systems, etc.
- Faster, more stable, and more accurate simulations of larger systems
- Provides advanced functionality for leading-edge researches: conductivity,
excited states, extended ensembles, downfolding, etc.
a Portal Site for Materials Science Simulation
From Developers’ viewpoint:
mismatch between
seeds and needs
“How and where can we distribute our codes?”
- Trade-off between “initial cost” and “scalability, functionality,
accuracy, performance”
- What kind of applications? Who develops them?
- Which application should we use for our problem?
- Manual and documentation are not well prepared
- How can we evaluate the accuracy of the results?
“How and where can we find and learn the best Apps?”
- Introduces materials science
applications/tools/databases
- Search from category, features,
targets, methods/algorithms
- Information of applications/tools
- brief introductions, links to homepage,
installation, usage, online hands-on,
developer’s voice, updates, license, etc.
http://ma.cms-initiative.jp/
- Forum for exchanging experiences between users and developers
- Voice from users
CMSI Open-source Application Software
Goal of MateriApps Project
Electronic structure calculation
(solid state physics)
Formation of community in the field of computational materials science
through the promotion of open-source software...
- Performs electronic structure calculation for a wide range of materials
including crystals, interfaces, liquids, etc. For example, OpenMX is able
to deal with non-collinear magnetism and non-equilibrium Green's
function calculations for electron transport
Pr
Computational
science experts
n
ne
w
rar
ts
m
ec
lthou h the terms o f use
oj
ormat.
pr
b nar
nt
d
an
ce
rfa
te arch
se
gr a m de v elo p er s
Code development,
documentation, user support
The development of better programs,
and high ratings from
outside for the algorithms and
programs are important
il
l on the
nn be
en source ro ram. In order
sers ma be able to alter the sou e code
or t t o be used b a w de ran e o users,
or incor orate their own ro ram i acco
first th e code must work correctl , and it
ance with the cal culation re uired, r the
must hav e an eas -to-use user nter ace
ma be able to make modifications to t he
such as a GUI as well as documentation
n r i ri
i
ll n n
in a anese or En lish such as manua ls
exam les are the L nux O , the macs
for installin and usi n it, and tutor ials
ed tor, and the
com ler.
for t ical users. In addition, user su or
Ther e are var ous t es o users n the
us n ema l, bullet n boards and so on,
field of com utational materials s ence.
and re ular course s for users are es se
Theorists ma us e the r o rams s la
t al. It s also nec essar to res ond to
forms for veri in new theories an
ox
re ests for b
f ixes and new featu res
mations, or for tr in out new ide
while
on an on oin basis.
ex er mental researchers and res
hers
To dat e there is l ittle o en source so
n cor orat ons w ll use them or n r re
ware rom a an n the eld o com ut
in ex erimental resul ts a nd model
real
i n lm
ri l
i n
Th m in r
materials. For com utational s ence
n f r hi r
h r
l
n
ex rts, o n source software sh ld be
nvolved n mak
so tware ree ava
seful for verif in t he out ut re lts of
l In r r
l
r h
rri r
he r own progra ms, benchmark
co
r ov d n and ma nta n n o en source
ut n s eed, and as modules or c
led
r o rams, M I s work n cont nuousl
alculations. Meanwhile, the r ui ments
to rov de tools or cre at n s tes or ma
for o en source software d iffer acco in to
a in source code and rovidin
r
he use to whi ch the are ut. T he
r ams and documentation, as well as
nclude ease o use r chness o
ture
im rovin courses for users and the we
on ex lains the a lications ava
s eed, accurac , and so on (Fi .1 .
site which
l
nown as
l a
. At the sa me
http://cmsi.github.io/MateriAppsLive/
time, we are wor kin to im rove the
k ll
D
nR
r h r
Conversel , what is th e oint of makin
software o en source, and what are the
Software where the s ource code is m l
iffer sli htl accordin
the ro ram,
called an o
HPC Hierarchy
andtoMateriApps
Flagship system (K, post-K,...)
Electronic Structure
Quantum Chemistry
Molecular Dynamics
Lattice Models
AkaiKKR☆
OpenMX☆
xTAPP☆
ABINIT☆
...
FMO☆
SMASH☆
GAMESS☆
DC☆
...
MODYLAS
Gromacs☆
ERmod☆
MDACP
...
ALPS☆
DSQSS
BLOCK
DMRG++
...
(37)
(19)
(16)
(21)
Continuum Models
Data Analysis
Viaualization
Database
ANSYS Multiphysics
Octa ...
(8)
CLUPAN
BSA
(25)
TAPIOCA☆
ParaView☆ (28)
MatNavi☆
AFOWLIB☆ (3)
Bold: CMSI Applications
☆: included in MateriApps LIVE!
a Portal Site for Materials Science Simulation
http://ma.cms-initiative.jp/
Introducing
on
https://youtu.be/xfDpilTcutw
on. N e w
N
Pro
i n fo r m a t i
.
de
ea
rch
bu g
co
in
tr
es
an d
ew
fn
no
- Performs simulations of strongly correlated systems such as magnetic
materials or correlated electrons. Heat capacities, susceptibilities,
magnetization processes in interacting spin systems, the density of states
of strongly correlated electrons, etc, can be calculated
jo
i es
isio
ew
j o i nt r
esea
r ch
a nd
j
oi n
td
ev
el
Requ
op
e
s
t
im
m
p
f
e
u
n
c
tion rove
d
s. N
ew use
ri
joi
nt n
re
Prov
Strongly correlated systems/
effective model calculation
HPC infrastructure supercomputers in Japan
Supercomputers for shared-use in research fields
Cloud computing, on-premises PC clusters
Personal workstations, PCs
enefits for develo ers? Releasin
ro
rams allows develo ers to rece ve eed
ack rom lots o eo le, allow n them to
ake the r ro rams more rel able. B
accept ng code rom collaborators, t s
also ossible to enhance the software b
addin new functions. In addition, com
un cat on w th users requently leads to
the develo ment of new al orithms, new
o nt research, and the creat on o com
un t es. Even a su er or al or thm s
developed, there s almost no chance or
that art cular a roach to be evaluated
unless it is im lemented in the form o
re.
his trend has been articularl
ro
nounced recentl n the eld o uantum
chemistr calculation, but in future, it is
l kely to spread to the whole computa
t onal sc ence n eneral. Ideall , code or
new a roaches to calculation will be
ade ava lable as o en source, and at the
same t me, the program w ll grow n the
commun t as bas c so tware or the
m lementat on o new chn
. I th s
sort of communit c
can e st
,
t w ll reatl bene t t onl t d
o ers but also the who com
. Pr
v d n o en source
ams c
n
not ust a serv ce or
er p
e, t
nothin short of leavi
a r ec d
our
achievements science
the rm of so
What MateriApps will Provide
li b
Publishing
software
Theorists
- Equipped with most of standard MD techniques including free energy
calculations based on thermodynamic integration method, and enables
investigations of large-scale real systems such as viruses, liposomes,
assemblies of proteins and micelles, and polymers
utat
ials
e I
150+ applications/tools on the list
8000+PV, 1300+ unique visitors / months
of
Interpretation
of
results,
exprimental
and use in modeling materials
Emphasis on usability
and
on
feature richness. Also emphasis
quality assurance and support.
Experimental
researchers & company
researchers
Verification of
new theories and calculation methods
Select high precision,
easily extensible programs
Molecular dynamics
Applications/Tools/Databases Introduced in
o
s io
- Performs quantum-mechanical simulations of large molecular systems
efficiently, and calculates various information regarding the structure
and function of biopolymers, such as the interaction between a protein
and a ligand
Program verification, benchmarking,
use as a development platform
Select programs with good performance,
which make good development platforms
Sustainable development of materials science applications for future HPC
systems including post-K flagship system and beyond...
vi
Electronic structure calculation
(quantum chemistry)
Establishment of infrastructure for easily starting materials science simulations for
theoreticians, experimentalists, researchers in companies, students, and more...
“A lot of information, careful explanation ...” “Plain design and rich contents ...”
“... able to know the applications I did not know before, ... nice to widely advertize
their own application software for developers ...”
“... hope that you can further lower the barrier to start materials simulation ...”
“... would be great if one can connect to a supercomputer directly
and execute simulations just after trial on USB ...”
“ ... would like to see the comparison of simulation results for the same system
using different application software ...”
Review articles on applications in each category will start soon
- To find application software Why is GAUSSIAN Used Worldwide?
- catalog of application/tool on MateriApps web
being standard calculation methods. This
p o p u l a r, but among
GAUSSIAN
a these
Debian
USB Live Linux System
- To learn application software
is the result of researchers of the first rank
distinguished itself from the others
through its ease of use ̶ particularly the
state-of-the-art theory and
- CMSI hands-on session at Kobe and other places developing
Bootable
USB
ease withdirectly
which inputfrom
data could
be stick (or in virtual machine)
calculation methods on an ongoing -basis
created. It almost goes without saying
and then providing the code to GAUSSIAN.
- web tutorials, distant learning
- justthat
boot
anda necessary
get ready
for materials
science simulations without installation!
this was
requirement
for
attaining widespread use. As the
- To start using application software
Exceptional Ease of Use
- Version
was
publishd
in July 2015
number1.7
of users
increased,
inevitably
the amount of feedback on modifications
The history of GAUSSIAN dates all the way
- MateriApps LIVE!
Pre-installed
software
and improvements
increased as well, and
back to the 1970 version (GAUSSIAN- 70).
responding to these needs caused the
But I first came in contact with the pro- MateriApps Cloud (comming soon!)
ABINIT,
AkaiKKR,
CP2K,
program to expand its ALPS,
advantages
over Feram,
gram in 1975. The shock of that initial
- To actively use application software
similar programs
even further.
encounter is still fresh in my mind today. ERmod,
GAMESS,
Gromacs, OpenMX,`
As I recall, at the time it consisted of some
Quantum ESPRESSO, SMASH, xTAPP,
- MateriApps Instasller
30,000 lines of Fortran (which made it an
A Rare Opportunity to
various visualization
exceptionally large program for its time). I and
Promote
a Japanese tools
- MateriApps Forum
remember being amazed at the originality
Software
800+
copiesWorldwide
downloaded/distributed since July 2013
Kazuo Kitaura
of the program's structure. At the time it
Professor, Graduate School of
System Informatics, Kobe University
was known as the overlay segment
method. Each step of the calculations was
almost completely independent of the
others: a two-electron integral calculation
section, an SCF calculation section and so
on. For this reason, when new functions
Establishment of a Global
were added, it could be done with only
Standard
the minimal amount of modification to
Today many programs for quantum chemrelevant sections. This made GAUSSIAN an
istry calculation exist. But one has an overoutstanding platform for verifying new
whelming share worldwide. That program
theories and calculation methods. Another
is GAUSSIAN. This program was developed
thing that had a profound impact on me
by a group led by John A. Pople, co-winner
was that fact that somewhere in the comof the Nobel Prize for Chemistry in 1998
ments it said that GAUSSIAN was "a quantum
for his development of computational
chemistry calculation program designed for
methods in quantum chemistry. GAUSSorganic chemists." At the time, anywhere
IAN is currently provided by Gaussian, Inc.
other than the United States, quantum
The program is so widely used ̶ not only
chemists had just started to perform ab
in academia but in industry as well, for
initio MO calculations. Looking back on it,
education, academic research and develit seems as if, even from the stage of initial
opmental research ̶ that it is said that a
development, GAUSSIAN had foreseen the
supercomputer will not sell unless it can
situation today, in which it is used as a
run GAUSSIAN. It is in the background of
research tool not just for quantum chemisthis overwhelming share that GAUSSIAN
try but for chemistry in general. Beginning
has become the standard for quantum
in the mid-1980s, the number of computachemistry calculation. GAUSSIAN is a
tional chemists increased, and experimen"standard" not only in the sense that it is
tal researchers themselves came to conused to verify whether or not the calculaduct
quantum
MateriApps
Installer
onchemistry calculations on
tions of other programs are correct, but
their own. As a result, the number of
https://github.com/wistaria/MateriAppsInstaller
also because so many people use GAUSSGAUSSIAN users increased dramatically. At
IAN that the theory and calculation meththe time, Hondo and a number of other ab
ods contained in GAUSSIAN are seen as
initio MO calculation programs were
For many years, people in Japan have
been concerned at the total lack of an academic program developed in Japan that is
popular worldwide. To avoid any misunderstanding, let me state that many Japanese
researchers have provided code for GAUSSIAN and GAMESS and other quantum
chemistry calculation programs that are
used worldwide. These programs were
"made in USA," but the code can be seen
as a product of the international community.
Each of them is an enormous program consisting of a million lines of Fortran. It would
be unrealistic to expect a program that
can compete with these to be developed
overnight. If the chance for a reset challenge
is to present itself, it will come only from
inventing a new algorithm with a method
that is completely different from existing
methods (which would be desirable), or
through innovations in computer architecture and programming language ̶ something that turns existing programs into
dinosaurs. If we think along these lines,
then right now ̶ when massively parallel
computers with several orders of magnitude more CPUs and cores are beginning
to come into widespread use ̶ may be
one of our few chances to develop a revolutionary parallel computing program that is
designed for use by next-generation exaflop computers and promote it worldwide.
Installer
- Collection of install scripts of MateriApps applications/tools
- together with sample job scripts
n a an, the K com
h
t
ade ava lable or
c us r
t
nd of Se tember 201
ut a
l ty stud es have be sta rt t
construct on o next
erat o
a- al
su ercom uters. We
r ov e
c
t on ro rams cr t cal o the
d
tational materials s en t t ar
uned for massivel
alle
ch
ture as well as work
oact
researchers in the c
ter ie e el
to des n the next
at o
s
com uters accord n l
tho
o
it wil l become increas
o
t
purs ue the consol da
o
t
on
code for com utation
ater ls Demo
ci
n order to establ sh a
uct
c .
https://youtu.be/Pn5H3ro6WgY
CMSI ublic relations bcom
ee r
r sentat ve: n e T
the I t
ol d tate Ph s cs,
Un
t
ok
Hands-on Installer Cloud
- Covers major supercomputers, workstations, PCs
K computer, ITC systems, ISSP/IMS/IMR supercomputer systems,
cluster workstations, PCs, Mac OS X
https://github.com/wistaria/MateriAppsInstaller
Cloud
on-demand execution of MateriApps applications
will start from Autumn 2015
32
MateriApps — 物質科学シミュレーションのポータルサイト
• 公開ソフトウェア(アプリケーション)を核としたコミュニティー形成をめざして
• 155の物質科学アプリケーションや
ツールを紹介(2015年9月現在)
• 「やりたいこと」からアプリケーショ
ンを検索
• 検索タグ:「特徴」「対象」「手法・
アルゴリズム」
• 開発者の声を利用者に届ける
• アプリ紹介、開発者ページ、アプリ
の魅力・将来性・応用性
• フォーラム(掲示板)を利用した意見交換
• 講習会情報・web講習会・更新情報
2013年5月公開
MateriApps,2013-2015. All rights reserved.
• 月間 8000 ページビューにまで成長
33
MateriApps 掲載アプリケーション
• 155の物質科学アプリケーションやツールを紹介 (2015年9月現在)
密度汎関数法
量子化学
分子動力学
格子模型
AkaiKKR☆
FMO☆
MODYLAS☆
ALPS☆
OpenMX☆
SMASH☆
Gromacs☆
DSQSS
xTAPP☆
GAMESS☆
ERmod☆
BLOCK
ABINIT☆
DC☆
MDACP
DMRG++
...
(37)
...
(19)
連続体シミュレーション
(8)
...
(19)
(22)
データ解析
可視化
phonopy☆ (26)
TAPIOCA☆ (28)
CLUPAN☆
ANSYS Multiphysics
Octa ...
...
fu☆
☆ MateriApps LIVE! 収録 ( 一部予定 ) アプリ
MateriApps,2013-2015. All rights reserved.
34
MateriApps 活動の目的
• 開発者側の問題点
• 有益なプログラムはもっと使われるべきだが、多くのソフトは研究室内にとど
まって終わる
• 公開・情報発信には手間がかかる
• アプリ開発を成果として主張しにくい(指標がない)
• 利用者側の問題点
• どんなプログラムがあるのかよくわからない
• インストール・使い方について知りたい
• 開発者の活動(特に講習会情報)をもっと知りたい
• 両者をつなぐ役割を果たしたい
35
MateriApps, 2013-2015. All rights reserved.
アプリケーション普及にむけた三本柱
• アプリの情報発信
• ポータルサイト MateriApps web
• スパコン上でのアプリ利用支援
• 「京」や国内主要スパコンへのアプリのプレインストール MateriApps Installer
• 個人・研究室レベルでのアプリ利用の支援
• MateriApps LIVE!
• インストールや入力ファイルの準備における「壁」を解消
• 計算科学の専門家だけではなく、実験家や企業内の利用、教育活動における活用へ
36
MateriApps,2013-2015. All rights reserved.
MateriApps LIVE! とは?
• USBメモリから直接ブートできる Linux システム (Debian Live Linux)
• Windows、Mac などで利用可
• インストール作業なしで物質科学アプリを実行できる
• バージョン1.8公開 (2015年8月31日)
• MateriAppsで紹介している公開アプリ・ツールを収録
• 2015年8月現在:ABINIT, AkaiKKR, ALPS,
CP2K, Feram ,ERmod, Gromacs, OpenMX、
Quantum Espresso, SMASH, xTAPP, VESTA 等
• GAMESS, VMDには自動インストーラーを準備
• MateriApps LIVE! サイトからダウンロード可能
• 900以上のコピーを配布済、学部講義でも利用
37
MateriApps, 2013-2015. All rights reserved.
MateriApps LIVE! ハンズオン
• MateriApps LIVE! の起動方法の説明
• 第一原理計算手法によるバンド計算
• 第一原理計算ソフト OpenMX
• 入力補助 C-Tools、可視化 VESTA、フェルミ面 XCrysDen
• 分子動力学法による溶液のシミュレーション
• 汎用分子動力学ソフト Gromacs
• 可視化ツール VMD
• モンテカルロ法によるスピン模型の相転移シミュレーション
• 強相関格子模型のシミュレーションパッケージ ALPS
• 可視化ツール ParaView
• 量子化学計算 (準備中)
• http://www.slideshare.net/cms_initiative/clipboards/materiappslive で公開中
38
MateriApps, 2013-2015. All rights reserved.