diff --git a/doc/en/locale/de/LC_MESSAGES/filespecification.po b/doc/en/locale/de/LC_MESSAGES/filespecification.po index 72d4c9bc4..decfe53f0 100644 --- a/doc/en/locale/de/LC_MESSAGES/filespecification.po +++ b/doc/en/locale/de/LC_MESSAGES/filespecification.po @@ -1280,7 +1280,7 @@ msgid "" "**Description :** If CalcHS=1, an efficient algorithm for generating the " "restricted Hilbert space with the specified quantum number is used " "(Details of algorithm is shown in " -"http://qlms.github.io/HPhi/develop/tips.pdf [in Japanese]). Default value" +"https://www.pasums.issp.u-tokyo.ac.jp/wp-content/themes/HPhi/media/develop/tips.pdf [in Japanese]). Default value" " is 1 and the efficient algorithm is used." msgstr "" diff --git a/doc/en/locale/de/LC_MESSAGES/howtouse.po b/doc/en/locale/de/LC_MESSAGES/howtouse.po index bc0bf1292..02fc0875f 100644 --- a/doc/en/locale/de/LC_MESSAGES/howtouse.po +++ b/doc/en/locale/de/LC_MESSAGES/howtouse.po @@ -345,7 +345,7 @@ msgid "You can download :math:`{\\mathcal H}\\Phi` at the following location." msgstr "" #: ../../howtouse/installation_en.rst:6 -msgid "https://github.com/QLMS/HPhi/releases" +msgid "https://github.com/issp-center-dev/HPhi/releases" msgstr "" #: ../../howtouse/installation_en.rst:8 diff --git a/doc/en/locale/de/LC_MESSAGES/index.po b/doc/en/locale/de/LC_MESSAGES/index.po index 9b0efc782..0df8713ca 100644 --- a/doc/en/locale/de/LC_MESSAGES/index.po +++ b/doc/en/locale/de/LC_MESSAGES/index.po @@ -85,8 +85,8 @@ msgstr "" #: ../../index.rst:30 msgid "" "You can download software and source codes of :math:`{\\mathcal H}\\Phi` " -"from `GitHub page `_ or `release page " -"`_." +"from `GitHub page `_ or `release page " +"`_." msgstr "" #: ../../index.rst:34 diff --git a/doc/en/locale/ja/LC_MESSAGES/filespecification.po b/doc/en/locale/ja/LC_MESSAGES/filespecification.po index 72d4c9bc4..decfe53f0 100644 --- a/doc/en/locale/ja/LC_MESSAGES/filespecification.po +++ b/doc/en/locale/ja/LC_MESSAGES/filespecification.po @@ -1280,7 +1280,7 @@ msgid "" "**Description :** If CalcHS=1, an efficient algorithm for generating the " "restricted Hilbert space with the specified quantum number is used " "(Details of algorithm is shown in " -"http://qlms.github.io/HPhi/develop/tips.pdf [in Japanese]). Default value" +"https://www.pasums.issp.u-tokyo.ac.jp/wp-content/themes/HPhi/media/develop/tips.pdf [in Japanese]). Default value" " is 1 and the efficient algorithm is used." msgstr "" diff --git a/doc/en/locale/ja/LC_MESSAGES/howtouse.po b/doc/en/locale/ja/LC_MESSAGES/howtouse.po index bc0bf1292..02fc0875f 100644 --- a/doc/en/locale/ja/LC_MESSAGES/howtouse.po +++ b/doc/en/locale/ja/LC_MESSAGES/howtouse.po @@ -345,7 +345,7 @@ msgid "You can download :math:`{\\mathcal H}\\Phi` at the following location." msgstr "" #: ../../howtouse/installation_en.rst:6 -msgid "https://github.com/QLMS/HPhi/releases" +msgid "https://github.com/issp-center-dev/HPhi/releases" msgstr "" #: ../../howtouse/installation_en.rst:8 diff --git a/doc/en/locale/ja/LC_MESSAGES/index.po b/doc/en/locale/ja/LC_MESSAGES/index.po index 9b0efc782..0df8713ca 100644 --- a/doc/en/locale/ja/LC_MESSAGES/index.po +++ b/doc/en/locale/ja/LC_MESSAGES/index.po @@ -85,8 +85,8 @@ msgstr "" #: ../../index.rst:30 msgid "" "You can download software and source codes of :math:`{\\mathcal H}\\Phi` " -"from `GitHub page `_ or `release page " -"`_." +"from `GitHub page `_ or `release page " +"`_." msgstr "" #: ../../index.rst:34 diff --git a/doc/en/source/algorithm/Lanczos_en.rst b/doc/en/source/algorithm/Lanczos_en.rst index 3fe47ce74..547304bbc 100644 --- a/doc/en/source/algorithm/Lanczos_en.rst +++ b/doc/en/source/algorithm/Lanczos_en.rst @@ -147,8 +147,8 @@ Details of implementation For the Lanczos method, an initial vector is specified with ``initial_iv``:math:`(\equiv r_s)` defined in an input file for Standard mode or a ModPara file for Expert mode. The type of initial vector can be selected as a real number or complex number by using ``InitialVecType`` in a ModPara file. - * For canonical ensemble and ``initial_iv``:math:`\geq 0` - A component of a target of the Hilbert space is given by + * For canonical ensemble and ``initial_iv``:math:`\geq 0`, + a component of a target of the Hilbert space is given by .. math:: @@ -157,8 +157,8 @@ For the Lanczos method, an initial vector is specified with ``initial_iv``:math: where :math:`N_{\rm dim}` is the total number of the Hilbert spaces and :math:`N_{\rm dim}/2` is added to avoid selecting a special Hilbert space for a default value ``initial_iv`` :math:`=1`. When the type of initial vector is selected as a real number, the coefficient value is given by :math:`1`, while when it is selected as a complex number, the value is given by :math:`(1+i)/\sqrt{2}`. - * For a grand canonical ensemble or ``initial_iv`` :math:`<0` - The initial vector is given by using a random generator, i.e., the coefficients of all the components for the initial vector are given by random numbers. The seed is calculated as + * For a grand canonical ensemble or ``initial_iv`` :math:`<0`, + the initial vector is given by using a random generator, i.e., the coefficients of all the components for the initial vector are given by random numbers. The seed is calculated as .. math:: diff --git a/doc/en/source/algorithm/Realtime_en.rst b/doc/en/source/algorithm/Realtime_en.rst index 0613e61fa..74c861f1f 100644 --- a/doc/en/source/algorithm/Realtime_en.rst +++ b/doc/en/source/algorithm/Realtime_en.rst @@ -7,14 +7,14 @@ In :math:`{\mathcal H}\Phi`, real time evolution calculation is done by using th .. math:: - |\Phi (t_n)\rangle = \exp^{-i {\cal H} \Delta t_n}|\Phi (t_{n-1})\rangle, + |\Phi (t_n)\rangle = \exp (-i {\cal H} \Delta t_n)|\Phi (t_{n-1})\rangle, where :math:`|\Phi(t_0)\rangle` is an initial wave function and :math:`t_n = \sum_{j=1}^n \Delta t_j`. -In calculation, we approximate :math:`\exp^{-i {\cal H} \Delta t_n}` as +In calculation, we approximate :math:`\exp (-i {\cal H} \Delta t_n)` as .. math:: - \exp^{-i {\cal H} \Delta t_n} =\sum_{l=0}^m \frac{1}{l!}(-i {\cal H} \Delta t_n)^l . + \exp (-i {\cal H} \Delta t_n) =\sum_{l=0}^m \frac{1}{l!}(-i {\cal H} \Delta t_n)^l . Here, the cut-off integer :math:`m` can be set by `ExpandCoef` in `ModPara`. We can judge whether the expansion order is enough or not by checking the norm conservation :math:`\langle \Phi (t_n)|\Phi (t_n)\rangle=1` and energy conservation :math:`\langle \Phi (t_n)|\hat{\cal H}|\Phi (t_n)\rangle=E`. diff --git a/doc/en/source/algorithm/TPQ_en.rst b/doc/en/source/algorithm/TPQ_en.rst index fddcc3a79..8b9c62249 100644 --- a/doc/en/source/algorithm/TPQ_en.rst +++ b/doc/en/source/algorithm/TPQ_en.rst @@ -90,7 +90,8 @@ For the TPQ method, the initial vector is given by using a random generator, i.e 123432+(n_{\rm run}+1)\times|r_s|+k_{\rm Thread}+N_{\rm Thread} \times k_{\rm Process}, where :math:`r_s` is the number given by an input file and :math:`n_{\rm run}` is the number of runs. :math:`r_s` and the maximum value of :math:`n_{\rm run}` are defined by ``initial_iv`` and ``NumAve`` in an input file for Standard mode or a ModPara file for Expert mode, respectively. Random numbers are generated by using SIMD-oriented Fast Mersenne Twister (dSFMT) [3]_ . We can select the type of initial vector as a real number or complex number by using ``InitialVecType`` in a ModPara file. -:math:`k_{\rm Thread}, N_{\rm Thread}, and k_{\rm Process}` indicate +:math:`k_{\rm Thread}, N_{\rm Thread},` +and :math:`k_{\rm Process}` indicate the thread ID, number of threads, process ID, respectively; the initial vector depends both on ``initial_iv`` and the number of parallelisms. diff --git a/doc/en/source/conf.py b/doc/en/source/conf.py index 150639133..1d5bf24c9 100644 --- a/doc/en/source/conf.py +++ b/doc/en/source/conf.py @@ -56,7 +56,7 @@ # General information about the project. project = u'HΦ Documentation' -copyright = u'2021, The University of Tokyo' +copyright = u'2022, The University of Tokyo' author = u'The University of Tokyo' # The version info for the project you're documenting, acts as replacement for diff --git a/doc/en/source/filespecification/expertmode_en/InterAll_file_en.rst b/doc/en/source/filespecification/expertmode_en/InterAll_file_en.rst index 0d988351d..11b2cb745 100644 --- a/doc/en/source/filespecification/expertmode_en/InterAll_file_en.rst +++ b/doc/en/source/filespecification/expertmode_en/InterAll_file_en.rst @@ -13,7 +13,9 @@ integrals :math:`I_{ijkl\sigma_1\sigma_2\sigma_3\sigma_4}`, {\mathcal H}+=\sum_{i,j,k,l}\sum_{\sigma_1,\sigma_2, \sigma_3, \sigma_4} I_{ijkl\sigma_1\sigma_2\sigma_3\sigma_4}c_{i\sigma_1}^{\dagger}c_{j\sigma_2}c_{k\sigma_3}^{\dagger}c_{l\sigma_4}. -For spin, the conditions :math:`i=j` and :math:`k=l` must be satisfied. An example of the file format is as follows. +For the off-diagonal component, be sure to provide a pair of i1 sigma1 i2 sigma2 i3 sigma3 i4 sigma4 and i4 sigma4 i3 sigma3 i2 sigma2 i1 sigma1. +For spin, the conditions :math:`i=j` and :math:`k=l` must be satisfied. +An example of the file format is as follows. :: @@ -138,4 +140,4 @@ Use rules .. raw:: latex - \newpage \ No newline at end of file + \newpage diff --git a/doc/en/source/howtouse/directorystructure_en.rst b/doc/en/source/howtouse/directorystructure_en.rst index 118e057af..f7d7f60cd 100644 --- a/doc/en/source/howtouse/directorystructure_en.rst +++ b/doc/en/source/howtouse/directorystructure_en.rst @@ -15,9 +15,11 @@ When HPhi-xxx.tar.gz is unzipped, the following directory structure is composed. |--doc/ | |--en/ | |--ja/ - | |--fourier/ + | |--tutorial/ + | |--tutorial_HPhi_en.pdf | |--userguide_en.pdf | |--userguide_jp.pdf + |--README.md |--samples/ |--src/ | |--*.c diff --git a/doc/en/source/howtouse/installation_en.rst b/doc/en/source/howtouse/installation_en.rst index de4aa2d08..3af6e6d11 100644 --- a/doc/en/source/howtouse/installation_en.rst +++ b/doc/en/source/howtouse/installation_en.rst @@ -3,23 +3,13 @@ Installation You can download :math:`{\mathcal H}\Phi` at the following location. -https://github.com/QLMS/HPhi/releases +https://github.com/issp-center-dev/HPhi/releases You can obtain the :math:`{\mathcal H}\Phi` directory by typing ``$ tar xzvf HPhi-xxx.tar.gz`` :math:`{\mathcal H}\Phi` can be installed by using cmake. - -.. tip:: - - | Before using cmake for sekirei, you must type - | ``module load cmake`` - | :math:`{\mathcal H}\Phi` has been preinstalled on ISSP supercomputers. - | If you want to use this preinstalled version, please type - | ``source /home/issp/materiapps/hphi/hphivars.sh`` -.. | ``source /home/issp/materiapps/tool/env.sh`` - We can compile :math:`{\mathcal H}\Phi` as:: cd $HOME/build/hphi diff --git a/doc/en/source/index.rst b/doc/en/source/index.rst index 7b041a761..41a2786bc 100644 --- a/doc/en/source/index.rst +++ b/doc/en/source/index.rst @@ -27,7 +27,7 @@ This software was developed with the support of \"*Project for advancement of so Download -------- -You can download software and source codes of :math:`{\mathcal H}\Phi` from `GitHub page `_ or `release page `_. +You can download software and source codes of :math:`{\mathcal H}\Phi` from `GitHub page `_ or `release page `_. Contents diff --git a/doc/en/source/introduction_en.rst b/doc/en/source/introduction_en.rst index 325d4e607..46a2e9ac0 100644 --- a/doc/en/source/introduction_en.rst +++ b/doc/en/source/introduction_en.rst @@ -31,6 +31,10 @@ Contributors This software was developed by the following contributors. +* ver.3.5.1 (released on 2022/6/14) + +* ver.3.5 (released on 2021/9/29) + * ver.3.4 (released on 2020/6/2) * Developers @@ -114,8 +118,7 @@ Operating environment :math:`{\mathcal H}\Phi` was tested on the following platforms -* The supercomputer system-B \"sekirei\" and system-C \"enaga\" in ISSP -* Fujitsu FX-10 +* The supercomputer system-B \"ohtaka\" in ISSP * Linux PC + Intel compiler * Linux PC + GCC. * Mac + GCC. diff --git a/doc/en/source/tutorial/fourier_en.rst b/doc/en/source/tutorial/fourier_en.rst index fde6ffe85..20950f32d 100644 --- a/doc/en/source/tutorial/fourier_en.rst +++ b/doc/en/source/tutorial/fourier_en.rst @@ -3,11 +3,5 @@ Fourier transformation of correlation functions =============================================== -This package has a utility which performs the Fourier transformation of the correlation function and plots that function. -The manual of this utility is located in :: - - doc/fourier/ja/_build/html/index.html - doc/fourier/ja/_build/latex/fourier.pdf - doc/fourier/en/_build/html/index.html - doc/fourier/en/_build/latex/fourier.pdf +This package has a utility which performs the Fourier transformation of the correlation function and plots that function. For details, see Appendix A. diff --git a/doc/ja/locale/de/LC_MESSAGES/filespecification.po b/doc/ja/locale/de/LC_MESSAGES/filespecification.po index 72d4c9bc4..decfe53f0 100644 --- a/doc/ja/locale/de/LC_MESSAGES/filespecification.po +++ b/doc/ja/locale/de/LC_MESSAGES/filespecification.po @@ -1280,7 +1280,7 @@ msgid "" "**Description :** If CalcHS=1, an efficient algorithm for generating the " "restricted Hilbert space with the specified quantum number is used " "(Details of algorithm is shown in " -"http://qlms.github.io/HPhi/develop/tips.pdf [in Japanese]). Default value" +"https://www.pasums.issp.u-tokyo.ac.jp/wp-content/themes/HPhi/media/develop/tips.pdf [in Japanese]). Default value" " is 1 and the efficient algorithm is used." msgstr "" diff --git a/doc/ja/locale/de/LC_MESSAGES/howtouse.po b/doc/ja/locale/de/LC_MESSAGES/howtouse.po index bc0bf1292..02fc0875f 100644 --- a/doc/ja/locale/de/LC_MESSAGES/howtouse.po +++ b/doc/ja/locale/de/LC_MESSAGES/howtouse.po @@ -345,7 +345,7 @@ msgid "You can download :math:`{\\mathcal H}\\Phi` at the following location." msgstr "" #: ../../howtouse/installation_en.rst:6 -msgid "https://github.com/QLMS/HPhi/releases" +msgid "https://github.com/issp-center-dev/HPhi/releases" msgstr "" #: ../../howtouse/installation_en.rst:8 diff --git a/doc/ja/locale/de/LC_MESSAGES/index.po b/doc/ja/locale/de/LC_MESSAGES/index.po index 9b0efc782..0df8713ca 100644 --- a/doc/ja/locale/de/LC_MESSAGES/index.po +++ b/doc/ja/locale/de/LC_MESSAGES/index.po @@ -85,8 +85,8 @@ msgstr "" #: ../../index.rst:30 msgid "" "You can download software and source codes of :math:`{\\mathcal H}\\Phi` " -"from `GitHub page `_ or `release page " -"`_." +"from `GitHub page `_ or `release page " +"`_." msgstr "" #: ../../index.rst:34 diff --git a/doc/ja/locale/ja/LC_MESSAGES/filespecification.po b/doc/ja/locale/ja/LC_MESSAGES/filespecification.po index 72d4c9bc4..decfe53f0 100644 --- a/doc/ja/locale/ja/LC_MESSAGES/filespecification.po +++ b/doc/ja/locale/ja/LC_MESSAGES/filespecification.po @@ -1280,7 +1280,7 @@ msgid "" "**Description :** If CalcHS=1, an efficient algorithm for generating the " "restricted Hilbert space with the specified quantum number is used " "(Details of algorithm is shown in " -"http://qlms.github.io/HPhi/develop/tips.pdf [in Japanese]). Default value" +"https://www.pasums.issp.u-tokyo.ac.jp/wp-content/themes/HPhi/media/develop/tips.pdf [in Japanese]). Default value" " is 1 and the efficient algorithm is used." msgstr "" diff --git a/doc/ja/locale/ja/LC_MESSAGES/howtouse.po b/doc/ja/locale/ja/LC_MESSAGES/howtouse.po index bc0bf1292..02fc0875f 100644 --- a/doc/ja/locale/ja/LC_MESSAGES/howtouse.po +++ b/doc/ja/locale/ja/LC_MESSAGES/howtouse.po @@ -345,7 +345,7 @@ msgid "You can download :math:`{\\mathcal H}\\Phi` at the following location." msgstr "" #: ../../howtouse/installation_en.rst:6 -msgid "https://github.com/QLMS/HPhi/releases" +msgid "https://github.com/issp-center-dev/HPhi/releases" msgstr "" #: ../../howtouse/installation_en.rst:8 diff --git a/doc/ja/locale/ja/LC_MESSAGES/index.po b/doc/ja/locale/ja/LC_MESSAGES/index.po index 9b0efc782..0df8713ca 100644 --- a/doc/ja/locale/ja/LC_MESSAGES/index.po +++ b/doc/ja/locale/ja/LC_MESSAGES/index.po @@ -85,8 +85,8 @@ msgstr "" #: ../../index.rst:30 msgid "" "You can download software and source codes of :math:`{\\mathcal H}\\Phi` " -"from `GitHub page `_ or `release page " -"`_." +"from `GitHub page `_ or `release page " +"`_." msgstr "" #: ../../index.rst:34 diff --git a/doc/ja/source/algorithm/Lanczos_ja.rst b/doc/ja/source/algorithm/Lanczos_ja.rst index f04b5e724..507613fd3 100644 --- a/doc/ja/source/algorithm/Lanczos_ja.rst +++ b/doc/ja/source/algorithm/Lanczos_ja.rst @@ -69,7 +69,7 @@ Lanczos法では、 :math:`\mathcal{K}_{n}({\mathcal H},\vec{x}_{0})` T_{n}=V_{n}^{\dagger}{\mathcal H} V_{n}\end{aligned} と変形されます。 ここで、 -:math:`V_{n}`\ を\ :math:`\vec{v}_{i}(i=0,1,\dots,n-1)`\ を +:math:`V_{n}`\ は\ :math:`\vec{v}_{i}(i=0,1,\dots,n-1)`\ を 並べた行列です。 :math:`T_{n}`\ は三重対角行列であり、 その対角成分は :math:`\alpha_{i}`, 副対角成分は\ :math:`\beta_{i}`\ で与えられます。 この三重対角行列\ :math:`T_{n}`\ の diff --git a/doc/ja/source/conf.py b/doc/ja/source/conf.py index 763c24d9a..ec48d675d 100644 --- a/doc/ja/source/conf.py +++ b/doc/ja/source/conf.py @@ -54,7 +54,7 @@ # General information about the project. project = u'HΦ マニュアル' -copyright = u'2021, The University of Tokyo' +copyright = u'2022, The University of Tokyo' author = u'The University of Tokyo' # The version info for the project you're documenting, acts as replacement for diff --git a/doc/ja/source/filespecification/expertmode_ja/InterAll_file_ja.rst b/doc/ja/source/filespecification/expertmode_ja/InterAll_file_ja.rst index e72ade5b7..effe4bb51 100644 --- a/doc/ja/source/filespecification/expertmode_ja/InterAll_file_ja.rst +++ b/doc/ja/source/filespecification/expertmode_ja/InterAll_file_ja.rst @@ -14,6 +14,7 @@ InterAll指定ファイル なお、スピンに関して計算する場合には、\ :math:`i=j, k=l`\ となるよう設定してください。 +また、オフダイアゴナル成分については、i1 sigma1 i2 sigma2 i3 sigma3 i4 sigma4 とi4 sigma4 i3 sigma3 i2 sigma2 i1 sigma1 のペアを必ず用意するようにしてください。 以下にファイル例を記載します。 :: diff --git a/doc/ja/source/filespecification/standardmode_ja/Parameters_for_time-evolution.rst b/doc/ja/source/filespecification/standardmode_ja/Parameters_for_time-evolution.rst index eb51b05b5..ae7faeb59 100644 --- a/doc/ja/source/filespecification/standardmode_ja/Parameters_for_time-evolution.rst +++ b/doc/ja/source/filespecification/standardmode_ja/Parameters_for_time-evolution.rst @@ -17,7 +17,7 @@ :math:`U_{\rm quench} \sum_i n_{i \uparrow} n_{i \downarrow}`\ が加えられる。 ``"Pulse Laser"``, ``"AC Laser"``, ``"DC Laser"``\ では、 ホッピング項に - :math:`-\sum_{i j \sigma} t_{i j} \exp[-i{\bf A}(t) \cdot ({\bf R}_i-{\bf R}_j)/(2\pi)] c^dagger_{i \sigma} c_{j \sigma}` + :math:`-\sum_{i j \sigma} t_{i j} \exp[-i{\bf A}(t) \cdot ({\bf R}_i-{\bf R}_j)/(2\pi)] c^{\dagger}_{i \sigma} c_{j \sigma}` のように位相因子が付く。 ここで\ :math:`{\bf A}(t)`\ はベクトルポテンシャルであり、 ``"Pulse Laser"``\ では diff --git a/doc/ja/source/howtouse/directorystructure_ja.rst b/doc/ja/source/howtouse/directorystructure_ja.rst index 20bef5612..c41ae2aa8 100644 --- a/doc/ja/source/howtouse/directorystructure_ja.rst +++ b/doc/ja/source/howtouse/directorystructure_ja.rst @@ -15,9 +15,11 @@ HPhi-xxx.gzを解凍後に構成されるディレクトリ構成を以下に示 |--doc/ | |--en/ | |--ja/ - | |--fourier/ + | |--tutorial/ + | |--tutorial_HPhi_en.pdf | |--userguide_en.pdf | |--userguide_jp.pdf + |--README.md |--samples/ |--src/ | |--*.c diff --git a/doc/ja/source/howtouse/installation_ja.rst b/doc/ja/source/howtouse/installation_ja.rst index 7d884bad9..0d4811c76 100644 --- a/doc/ja/source/howtouse/installation_ja.rst +++ b/doc/ja/source/howtouse/installation_ja.rst @@ -3,28 +3,13 @@ :math:`{\mathcal H}\Phi` は次の場所からダウンロードできます。 -https://github.com/QLMS/HPhi/releases +https://github.com/issp-center-dev/HPhi/releases ダウンロードしたファイルを次のように展開してください。 ``$ tar xzvf HPhi-xxx.tar.gz`` :math:`{\mathcal H}\Phi`\ はcmakeを利用してインストールできます。 - - -.. tip:: - - | 物性研スパコンシステムであるsekireiとenaga で cmake を利用するには - | ``module load cmake`` - | をあらかじめ実行する必要があります。 - | なお、両システムでは :math:`{\mathcal H}\Phi` がプレインストールされております。 - | 詳しくは `スパコン公式ページ `_ をご参照ください。 - -.. | sekirei で cmake を利用するには - | ``source /home/issp/materiapps/tool/env.sh`` - | をあらかじめ実行する必要があります。 - - :math:`{\mathcal H}\Phi`\ を展開したディレクトリのパスを$PathTohphi 、ビルドディレクトリを$HOME/build/hphi (任意の場所を指定可能)とした場合に、 :: diff --git a/doc/ja/source/index.rst b/doc/ja/source/index.rst index c4ff1293c..826c9870d 100644 --- a/doc/ja/source/index.rst +++ b/doc/ja/source/index.rst @@ -26,7 +26,7 @@ Mitsuaki Kawamura, Kazuyoshi Yoshimi, Takahiro Misawa, Youhei Yamaji, Synge Todo ダウンロード ------------------ -:math:`{\mathcal H}\Phi` のソースコードは `GitHub page `_ or `release page `_ からダウンロードできます。 +:math:`{\mathcal H}\Phi` のソースコードは `GitHub page `_ or `release page `_ からダウンロードできます。 Contents diff --git a/doc/ja/source/introduction_ja.rst b/doc/ja/source/introduction_ja.rst index 55f949925..80b9ddff2 100644 --- a/doc/ja/source/introduction_ja.rst +++ b/doc/ja/source/introduction_ja.rst @@ -57,6 +57,10 @@ What is :math:`{\mathcal H}\Phi`? 本ソフトウェアは以下の開発貢献者により開発されています。 +- ver.3.5.1 (2022/6/14 リリース) + +- ver.3.5 (2021/9/29 リリース) + - ver.3.4 (2020/6/2 リリース) - 開発者 @@ -137,9 +141,7 @@ What is :math:`{\mathcal H}\Phi`? 以下の環境で動作することを確認しています。 -- 東京大学物性研究所スーパーコンピューターシステムB「sekirei」、システムC「enaga」 - -- 富士通 FX-10 +- 東京大学物性研究所スーパーコンピューターシステムB「ohtaka」 - Linux PC + intelコンパイラ diff --git a/doc/ja/source/tutorial/fourier_ja.rst b/doc/ja/source/tutorial/fourier_ja.rst index f906a067d..c7b50cfd8 100644 --- a/doc/ja/source/tutorial/fourier_ja.rst +++ b/doc/ja/source/tutorial/fourier_ja.rst @@ -4,11 +4,4 @@ =============================================== このパッケージには、上で求めた相関関数をフーリエ変換し、プロットするユーティリティーが付属しています。 -このユーティリティーに関するマニュアルは :: - - doc/fourier/ja/_build/html/index.html - doc/fourier/ja/_build/latex/fourier.pdf - doc/fourier/en/_build/html/index.html - doc/fourier/en/_build/latex/fourier.pdf - -にありますので、そちらを参照してください。 +詳細についてはAppendix Aをご覧ください。 diff --git a/samples/tutorial_1.1/run.sh b/samples/tutorial_1.1/run.sh index 2b52c98a6..ea3a03c50 100644 --- a/samples/tutorial_1.1/run.sh +++ b/samples/tutorial_1.1/run.sh @@ -1,7 +1,7 @@ -#!/bin/sh -$1 -s stan1.in -$1 -s stan2.in -$1 -s stan3.in -$1 -s stan4.in -$1 -s stan5a.in -$1 -s stan5b.in +#!/bin/sh +$1 -s stan1.in +$1 -s stan2.in +$1 -s stan3.in +$1 -s stan4.in +$1 -s stan5a.in +$1 -s stan5b.in diff --git a/samples/tutorial_1.2/run.sh b/samples/tutorial_1.2/run.sh index 7df0f50e0..f308b99dd 100644 --- a/samples/tutorial_1.2/run.sh +++ b/samples/tutorial_1.2/run.sh @@ -1,3 +1,3 @@ -#!/bin/sh -$1 -s stan1.in -$1 -s stan2.in +#!/bin/sh +$1 -s stan1.in +$1 -s stan2.in diff --git a/samples/tutorial_1.3/run.sh b/samples/tutorial_1.3/run.sh index 3f3bb47d4..267ecc2c0 100644 --- a/samples/tutorial_1.3/run.sh +++ b/samples/tutorial_1.3/run.sh @@ -1,2 +1,2 @@ -#!/bin/sh -$1 -s stan1.in +#!/bin/sh +$1 -s stan1.in diff --git a/samples/tutorial_1.4/run.sh b/samples/tutorial_1.4/run.sh index 65b9958a4..e51930351 100644 --- a/samples/tutorial_1.4/run.sh +++ b/samples/tutorial_1.4/run.sh @@ -1,5 +1,5 @@ -#!/bin/sh -$1 -s stan1.in -$1 -s stan2.in -$1 -s stan3.in -$1 -s stan4.in +#!/bin/sh +$1 -s stan1.in +$1 -s stan2.in +$1 -s stan3.in +$1 -s stan4.in diff --git a/samples/tutorial_1.5/run.sh b/samples/tutorial_1.5/run.sh index 20a079890..904cd6b91 100644 --- a/samples/tutorial_1.5/run.sh +++ b/samples/tutorial_1.5/run.sh @@ -1,5 +1,5 @@ -#!/bin/sh -$1 -sdry stan1.in -python3 MakeGreen.py -$1 -e namelist.def -python3 CalcSq.py +#!/bin/sh +$1 -sdry stan1.in +python3 MakeGreen.py +$1 -e namelist.def +python3 CalcSq.py diff --git a/samples/tutorial_1.6/run.sh b/samples/tutorial_1.6/run.sh index e4315910f..d2c92818d 100644 --- a/samples/tutorial_1.6/run.sh +++ b/samples/tutorial_1.6/run.sh @@ -1,3 +1,3 @@ -#!/bin/sh -python3 MakeDef.py -$1 -e namelist_cg.def +#!/bin/sh +python3 MakeDef.py +$1 -e namelist_cg.def diff --git a/samples/tutorial_2.1/run.sh b/samples/tutorial_2.1/run.sh index 5bdb977f4..756cf8643 100644 --- a/samples/tutorial_2.1/run.sh +++ b/samples/tutorial_2.1/run.sh @@ -1,7 +1,7 @@ -#!/bin/sh -$1 -s stan1.in -python3 Finite.py -$1 -s stan2.in -python3 AveSSrand.py -$1 -s stan3.in -python3 AveFlct.py +#!/bin/sh +$1 -s stan1.in +python3 Finite.py +$1 -s stan2.in +python3 AveSSrand.py +$1 -s stan3.in +python3 AveFlct.py diff --git a/samples/tutorial_2.2/run.sh b/samples/tutorial_2.2/run.sh index 5666cbd75..ab238f1ca 100644 --- a/samples/tutorial_2.2/run.sh +++ b/samples/tutorial_2.2/run.sh @@ -1,4 +1,4 @@ -#!/bin/sh -$1 -s stan1.in -$1 -s stan2a.in -python3 AveSSrand.py +#!/bin/sh +$1 -s stan1.in +$1 -s stan2a.in +python3 AveSSrand.py diff --git a/samples/tutorial_3.1/run.sh b/samples/tutorial_3.1/run.sh index 7df0f50e0..f308b99dd 100644 --- a/samples/tutorial_3.1/run.sh +++ b/samples/tutorial_3.1/run.sh @@ -1,3 +1,3 @@ -#!/bin/sh -$1 -s stan1.in -$1 -s stan2.in +#!/bin/sh +$1 -s stan1.in +$1 -s stan2.in diff --git a/samples/tutorial_3.2/run.sh b/samples/tutorial_3.2/run.sh index 7df0f50e0..f308b99dd 100644 --- a/samples/tutorial_3.2/run.sh +++ b/samples/tutorial_3.2/run.sh @@ -1,3 +1,3 @@ -#!/bin/sh -$1 -s stan1.in -$1 -s stan2.in +#!/bin/sh +$1 -s stan1.in +$1 -s stan2.in diff --git a/samples/tutorial_4.1/run.sh b/samples/tutorial_4.1/run.sh index 7df0f50e0..f308b99dd 100644 --- a/samples/tutorial_4.1/run.sh +++ b/samples/tutorial_4.1/run.sh @@ -1,3 +1,3 @@ -#!/bin/sh -$1 -s stan1.in -$1 -s stan2.in +#!/bin/sh +$1 -s stan1.in +$1 -s stan2.in diff --git a/samples/tutorial_4.3/run.sh b/samples/tutorial_4.3/run.sh index 28edb3a4a..8cca0cb4a 100644 --- a/samples/tutorial_4.3/run.sh +++ b/samples/tutorial_4.3/run.sh @@ -1,2 +1,2 @@ -#!/bin/sh -python spinchain_example.py $1 +#!/bin/sh +python spinchain_example.py $1 diff --git a/src/CalcByLOBPCG.c b/src/CalcByLOBPCG.c index d4d3bffaf..b26168693 100644 --- a/src/CalcByLOBPCG.c +++ b/src/CalcByLOBPCG.c @@ -135,10 +135,8 @@ static double calc_preshift( double k, i; double preshift; - if (fabs(eig) > 10.0) k = trunc(log10(fabs(eig))); - else k = 1.0; - if (res < 1.0) { + k = trunc(log10(fabs(eig))); if (eps_LOBPCG > res) i = ceil(log10(eps_LOBPCG)); else i = ceil(log10(res)); @@ -340,10 +338,10 @@ int LOBPCG_Main( ***hwxp/*[0] h*w, [1] h*x, [2] h*p of Ref.1*/, *hsub, *ovlp /*Subspace Hamiltonian and Overlap*/, **work; - double *eig, dnorm, eps_LOBPCG, eigabs_max, preshift, precon, dnormmax, *eigsub; - int do_precon = 0;//If = 1, use preconditioning (experimental) + double *eig, dnorm, eps_LOBPCG, eigabs_max, preshift, precon, dnormmax, *eigsub, eig_pos_shift; nsub = 3 * X->Def.k_exct; + eig_pos_shift = LargeValue * X->Def.NsiteMPI; eig = d_1d_allocate(X->Def.k_exct); eigsub = d_1d_allocate(nsub); @@ -421,14 +419,14 @@ int LOBPCG_Main( /**@brief
  • Preconditioning (Point Jacobi): @f${\bf w}={\hat T}^{-1} {\bf w}@f$
  • */ - if (do_precon == 1) { - preshift = calc_preshift(eig[ie], dnorm, eps_LOBPCG); + if (X->Def.PreCG == 1) { + preshift = calc_preshift(eig[ie]+ eig_pos_shift, dnorm, eps_LOBPCG) - eig_pos_shift; #pragma omp parallel for default(none) shared(wxp,ie,list_Diagonal,preshift,i_max,eps_LOBPCG) private(idim,precon) for (idim = 1; idim <= i_max; idim++) { precon = list_Diagonal[idim] - preshift; if(fabs(precon) > eps_LOBPCG) wxp[0][ie][idim] /= precon; } - }/*if(do_precon == 1)*/ + }/*if(X->Def.PreCG == 1)*/ /**@brief
  • Normalize residual vector: @f${\bf w}={\bf w}/|w|@f$ */ diff --git a/src/CalcSpectrumByBiCG.c b/src/CalcSpectrumByBiCG.c index c6bdac3a3..28f8d1b1d 100644 --- a/src/CalcSpectrumByBiCG.c +++ b/src/CalcSpectrumByBiCG.c @@ -156,7 +156,9 @@ void InitShadowRes( double complex *v4//!<[out] [CheckList::idim_max] shadow residual vector ) { - long int idim, iv; + + long int iv; + long unsigned int idim; int mythread; double dnorm; /* diff --git a/src/HPhiMain.c b/src/HPhiMain.c index 554bddc8a..3d6918899 100644 --- a/src/HPhiMain.c +++ b/src/HPhiMain.c @@ -84,17 +84,17 @@ - @ref page_addexpert - @ref page_time - @ref page_log - - Some contrivances for HPhi (only in Jananese) http://qlms.github.io/HPhi/develop/tips.pdf + - Some contrivances for HPhi (only in Jananese) https://www.pasums.issp.u-tokyo.ac.jp/wp-content/themes/HPhi/media/develop/tips.pdf .

    Link

    - https://github.com/QLMS/HPhi + https://github.com/issp-center-dev/HPhi

    Download

    - https://github.com/QLMS/HPhi/releases + https://github.com/issp-center-dev/HPhi/releases

    Forum

    - https://github.com/QLMS/HPhi/issues + https://github.com/issp-center-dev/HPhi/issues

    licence

    GNU GPL version 3\n diff --git a/src/include/struct.h b/src/include/struct.h index 48762ab2c..e8b8b4c71 100644 --- a/src/include/struct.h +++ b/src/include/struct.h @@ -306,6 +306,7 @@ struct DefineList { int **SpinTEChemi; /**< [NTE][Nsite] */ double **ParaTEChemi; /**< [NTE][Nsite] */ //[e] For Time Evolution + int PreCG;/**< 1: Use preconditioning in LOBPCG */ };/*struct DefineList*/ /** @brief Size of the Hilbert space diff --git a/src/mltplyHubbard.c b/src/mltplyHubbard.c index 6a0a9d845..4d7df4820 100644 --- a/src/mltplyHubbard.c +++ b/src/mltplyHubbard.c @@ -542,7 +542,7 @@ double complex pairhopp( double complex *tmp_v1,//!<[in] Input producted vector struct BindStruct *X//!<[inout] ) { - long int j; + long unsigned int j; long unsigned int i_max = X->Large.i_max; long unsigned int off = 0; double complex dam_pr = 0.0; @@ -771,7 +771,7 @@ double complex GC_pairhopp( double complex *tmp_v1,//!<[in] Input producted vector struct BindStruct *X//!<[inout] ) { - long int j; + long unsigned int j; long unsigned int i_max = X->Large.i_max; long unsigned int off = 0; double complex dam_pr = 0.0; @@ -793,7 +793,7 @@ double complex GC_exchange( double complex *tmp_v1, struct BindStruct *X ) { - long int j; + long unsigned int j; long unsigned int i_max = X->Large.i_max; long unsigned int off = 0; double complex dam_pr = 0.0; diff --git a/src/mltplySpin.c b/src/mltplySpin.c index 4296bc953..e8b52e106 100644 --- a/src/mltplySpin.c +++ b/src/mltplySpin.c @@ -1000,7 +1000,7 @@ double complex GC_pairlift_spin( double complex *tmp_v1,//!<[in] Input producted vector struct BindStruct *X//!<[inout] ) { - long int j; + long unsigned int j; long unsigned int i_max = X->Large.i_max; long unsigned int off = 0; double complex dam_pr = 0; diff --git a/src/readdef.c b/src/readdef.c index 1e782e563..80919d19e 100644 --- a/src/readdef.c +++ b/src/readdef.c @@ -485,6 +485,7 @@ int ReadDefFileNInt( NumAve=1; X->Param.ExpecInterval=1; cFileNameListFile = malloc(sizeof(char)*D_CharTmpReadDef*D_iKWNumDef); + X->PreCG = 0; fprintf(stdoutMPI, cReadFileNamelist, xNameListFile); if(GetFileName(xNameListFile, cFileNameListFile)!=0){ @@ -642,6 +643,9 @@ int ReadDefFileNInt( else if(CheckWords(ctmp, "TargetTPQRand")==0) { X->irand=(int)dtmp; } + else if (CheckWords(ctmp, "PreCG") == 0) { + X->PreCG = (int)dtmp; + } else { return (-1); } @@ -2270,99 +2274,114 @@ int CheckInterAllHermite icntincorrect = 0; icntHermite = 0; for (i = 0; i < NInterAllOffDiagonal; i++) { - itmpret = 0; - isite1 = InterAllOffDiagonal[i][0]; - isigma1 = InterAllOffDiagonal[i][1]; - isite2 = InterAllOffDiagonal[i][2]; - isigma2 = InterAllOffDiagonal[i][3]; - isite3 = InterAllOffDiagonal[i][4]; - isigma3 = InterAllOffDiagonal[i][5]; - isite4 = InterAllOffDiagonal[i][6]; - isigma4 = InterAllOffDiagonal[i][7]; - icheckHermiteCount = FALSE; - - for (j = 0; j < NInterAllOffDiagonal; j++) { - itmpsite1 = InterAllOffDiagonal[j][0]; - itmpsigma1 = InterAllOffDiagonal[j][1]; - itmpsite2 = InterAllOffDiagonal[j][2]; - itmpsigma2 = InterAllOffDiagonal[j][3]; - itmpsite3 = InterAllOffDiagonal[j][4]; - itmpsigma3 = InterAllOffDiagonal[j][5]; - itmpsite4 = InterAllOffDiagonal[j][6]; - itmpsigma4 = InterAllOffDiagonal[j][7]; - - if (isite1 == itmpsite4 && isite2 == itmpsite3 && isite3 == itmpsite2 && isite4 == itmpsite1) { - if (isigma1 == itmpsigma4 && isigma2 == itmpsigma3 && isigma3 == itmpsigma2 && isigma4 == itmpsigma1) { - ddiff_intall = cabs(ParaInterAllOffDiagonal[i] - conj(ParaInterAllOffDiagonal[j])); - - if (cabs(ddiff_intall) < eps_CheckImag0) { - itmpret = 1; - if (icheckHermiteCount == FALSE) { - icheckHermiteCount = TRUE; //for not double counting - if (i <= j) { - if (2 * icntHermite >= NInterAllOffDiagonal) { - fprintf(stdoutMPI, "Elements of InterAll are incorrect.\n"); - return (-1); - } - - for (itmpIdx = 0; itmpIdx < 8; itmpIdx++) { - InterAll[2 * icntHermite][itmpIdx] = InterAllOffDiagonal[i][itmpIdx]; - InterAll[2 * icntHermite + 1][itmpIdx] = InterAllOffDiagonal[j][itmpIdx]; - } - - ParaInterAll[2 * icntHermite] = ParaInterAllOffDiagonal[i]; - ParaInterAll[2 * icntHermite + 1] = ParaInterAllOffDiagonal[j]; - icntHermite++; + itmpret = 0; + isite1 = InterAllOffDiagonal[i][0]; + isigma1 = InterAllOffDiagonal[i][1]; + isite2 = InterAllOffDiagonal[i][2]; + isigma2 = InterAllOffDiagonal[i][3]; + isite3 = InterAllOffDiagonal[i][4]; + isigma3 = InterAllOffDiagonal[i][5]; + isite4 = InterAllOffDiagonal[i][6]; + isigma4 = InterAllOffDiagonal[i][7]; + icheckHermiteCount = FALSE; + + for (j = 0; j < NInterAllOffDiagonal; j++) { + itmpsite1 = InterAllOffDiagonal[j][0]; + itmpsigma1 = InterAllOffDiagonal[j][1]; + itmpsite2 = InterAllOffDiagonal[j][2]; + itmpsigma2 = InterAllOffDiagonal[j][3]; + itmpsite3 = InterAllOffDiagonal[j][4]; + itmpsigma3 = InterAllOffDiagonal[j][5]; + itmpsite4 = InterAllOffDiagonal[j][6]; + itmpsigma4 = InterAllOffDiagonal[j][7]; + if (isite1 == itmpsite4 && isite2 == itmpsite3 && isite3 == itmpsite2 && isite4 == itmpsite1) { + if (isigma1 == itmpsigma4 && isigma2 == itmpsigma3 && isigma3 == itmpsigma2 && isigma4 == itmpsigma1) { + ddiff_intall = cabs(ParaInterAllOffDiagonal[i] - conj(ParaInterAllOffDiagonal[j])); + if (cabs(ddiff_intall) < eps_CheckImag0) { + itmpret = 1; + if (icheckHermiteCount == FALSE) { + if (i <= j) { + icheckHermiteCount = TRUE; //for not double counting + if (2 * icntHermite >= NInterAllOffDiagonal) { + fprintf(stdoutMPI, "Elements of InterAll are incorrect.\n"); + return (-1); + } + for (itmpIdx = 0; itmpIdx < 8; itmpIdx++) { + InterAll[2 * icntHermite][itmpIdx] = InterAllOffDiagonal[i][itmpIdx]; + InterAll[2 * icntHermite + 1][itmpIdx] = InterAllOffDiagonal[j][itmpIdx]; + } + ParaInterAll[2 * icntHermite] = ParaInterAllOffDiagonal[i]; + ParaInterAll[2 * icntHermite + 1] = ParaInterAllOffDiagonal[j]; + icntHermite++; + break; + } + } + } } - break; - } } - } - } else if (isite1 == itmpsite2 && isite2 == itmpsite1 && isite3 == itmpsite4 && - isite4 == itmpsite3) { //for spin and Kondo - if (iCalcModel == Kondo || iCalcModel == KondoGC || iCalcModel == Spin || iCalcModel == SpinGC) { - if (isigma1 == itmpsigma2 && isigma2 == itmpsigma1 && isigma3 == itmpsigma4 && isigma4 == itmpsigma3) { - ddiff_intall = ParaInterAllOffDiagonal[i] - conj(ParaInterAllOffDiagonal[j]); - if (cabs(ddiff_intall) < eps_CheckImag0) { - itmpret = 1; - if (icheckHermiteCount == FALSE) { - icheckHermiteCount = TRUE; // for not double-counting - if (i <= j) { - if (2 * icntHermite >= NInterAllOffDiagonal) { - fprintf(stdoutMPI, "Elements of InterAll are incorrect.\n"); - return (-1); - } - for (itmpIdx = 0; itmpIdx < 8; itmpIdx++) { - InterAll[2 * icntHermite][itmpIdx] = InterAllOffDiagonal[i][itmpIdx]; - } - for (itmpIdx = 0; itmpIdx < 4; itmpIdx++) { - InterAll[2 * icntHermite + 1][2 * itmpIdx] = InterAllOffDiagonal[i][6 - - 2 * - itmpIdx]; - InterAll[2 * icntHermite + 1][2 * itmpIdx + 1] = InterAllOffDiagonal[i][7 - 2 * - itmpIdx]; + } + if (itmpret != 1) { + if (iCalcModel == Kondo || iCalcModel == KondoGC || iCalcModel == Spin || iCalcModel == SpinGC) { + if (isite1 != isite3 && isigma1 != isigma3 && isite2 != isite4 && isigma2 != isigma4) { + for (j = 0; j < NInterAllOffDiagonal; j++) { + itmpsite1 = InterAllOffDiagonal[j][0]; + itmpsigma1 = InterAllOffDiagonal[j][1]; + itmpsite2 = InterAllOffDiagonal[j][2]; + itmpsigma2 = InterAllOffDiagonal[j][3]; + itmpsite3 = InterAllOffDiagonal[j][4]; + itmpsigma3 = InterAllOffDiagonal[j][5]; + itmpsite4 = InterAllOffDiagonal[j][6]; + itmpsigma4 = InterAllOffDiagonal[j][7]; + if (isite1 == itmpsite2 && isite2 == itmpsite1 && isite3 == itmpsite4 && + isite4 == itmpsite3) { //for spin and Kondo + if (isigma1 == itmpsigma2 && isigma2 == itmpsigma1 && isigma3 == itmpsigma4 && + isigma4 == itmpsigma3) { + ddiff_intall = ParaInterAllOffDiagonal[i] - conj(ParaInterAllOffDiagonal[j]); + if (cabs(ddiff_intall) < eps_CheckImag0) { + itmpret = 1; + if (i <= j) { + if (icheckHermiteCount == FALSE) { + icheckHermiteCount = TRUE; // for not double-counting + if (2 * icntHermite >= NInterAllOffDiagonal) { + fprintf(stdoutMPI, "Elements of InterAll are incorrect.\n"); + return (-1); + } + for (itmpIdx = 0; itmpIdx < 8; itmpIdx++) { + InterAll[2 * icntHermite][itmpIdx] = InterAllOffDiagonal[i][itmpIdx]; + } + for (itmpIdx = 0; itmpIdx < 4; itmpIdx++) { + InterAll[2 * icntHermite + 1][2 * itmpIdx] = InterAllOffDiagonal[i][6 - + 2 * + itmpIdx]; + InterAll[2 * icntHermite + 1][2 * itmpIdx + 1] = InterAllOffDiagonal[i][ + 7 - + 2 * + itmpIdx]; + } + ParaInterAll[2 * icntHermite] = ParaInterAllOffDiagonal[i]; + ParaInterAll[2 * icntHermite + 1] = ParaInterAllOffDiagonal[j]; + icntHermite++; + break; + } + } + } + } + } } - ParaInterAll[2 * icntHermite] = ParaInterAllOffDiagonal[i]; - ParaInterAll[2 * icntHermite + 1] = ParaInterAllOffDiagonal[j]; - icntHermite++; - } - break; } - } } - } } - } - //if counterpart for satisfying hermite conjugate does not exist. - if (itmpret != 1) { - fprintf(stdoutMPI, cErrNonHermiteInterAll, isite1, isigma1, isite2, isigma2, isite3, isigma3, isite4, isigma4, - creal(ParaInterAllOffDiagonal[i]), cimag(ParaInterAllOffDiagonal[i])); - icntincorrect++; - } + //if counterpart for satisfying hermite conjugate does not exist. + if (itmpret != 1) { + fprintf(stdoutMPI, cErrNonHermiteInterAll, isite1, isigma1, isite2, isigma2, isite3, isigma3, isite4, isigma4, + creal(ParaInterAllOffDiagonal[i]), cimag(ParaInterAllOffDiagonal[i])); + icntincorrect++; + } } - if (icntincorrect != 0) { + //if (icntincorrect != 0) { + if (icntincorrect != 0 || NInterAllOffDiagonal != 2*icntHermite) { return (-1); } diff --git a/src/sz.c b/src/sz.c index 811fc54e2..028f5491e 100644 --- a/src/sz.c +++ b/src/sz.c @@ -71,17 +71,19 @@ int sz char sdt[D_FileNameMax],sdt_err[D_FileNameMax]; long unsigned int *HilbertNumToSz; long unsigned int i,icnt; - long unsigned int ib,jb; + long unsigned int ib,jb,ib_start,ib_end, sdim_div, sdim_rest; long unsigned int j; long unsigned int div; long unsigned int num_up,num_down; long unsigned int irght,ilft,ihfbit; + long unsigned int *jbthread; //*[s] for omp parall + int mythread; unsigned int all_up,all_down,tmp_res,num_threads; long unsigned int tmp_1,tmp_2,tmp_3; - long int **comb; + long int **comb, **comb2; //*[e] for omp parall // [s] for Kondo @@ -312,34 +314,73 @@ int sz } break; }else if(hacker==1){ - // this part can not be parallelized - jb = 0; - - for(ib=0;ibCheck.sdim;ib++){ - list_jb[ib]=jb; - - i=ib*ihfbit; - num_up=0; - for(j=0;j<=N2-2;j+=2){ - div=i & X->Def.Tpow[j]; - div=div/X->Def.Tpow[j]; - num_up+=div; + jbthread = lui_1d_allocate(nthreads); + #pragma omp parallel default(none) \ + shared(X,list_jb,ihfbit,N2,nthreads,jbthread) \ + private(ib,i,j,num_up,num_down,div,tmp_res,tmp_1,tmp_2,jb,all_up,all_down, \ + comb2,mythread,sdim_div,sdim_rest,ib_start,ib_end) + { + jb = 0; +#ifdef _OPENMP + mythread = omp_get_thread_num(); +#else + mythread = 0; +#endif + comb2 = li_2d_allocate(X->Def.Nsite+1,X->Def.Nsite+1); + // + // explict loop decomposition is nessesary to fix the asignment to each thread + // + sdim_div = X->Check.sdim / nthreads; + sdim_rest = X->Check.sdim % nthreads; + if(mythread < sdim_rest){ + ib_start = sdim_div*mythread + mythread; + ib_end = ib_start + sdim_div + 1; } - num_down=0; - for(j=1;j<=N2-1;j+=2){ - div=i & X->Def.Tpow[j]; - div=div/X->Def.Tpow[j]; - num_down+=div; + else{ + ib_start = sdim_div*mythread + sdim_rest; + ib_end = ib_start + sdim_div; } + // + for(ib=ib_start;ibDef.Nsite%2; // even Ns-> 0, odd Ns -> 1 - all_up = (X->Def.Nsite+tmp_res)/2; - all_down = (X->Def.Nsite-tmp_res)/2; + i=ib*ihfbit; + num_up=0; + for(j=0;j<=N2-2;j+=2){ + div=i & X->Def.Tpow[j]; + div=div/X->Def.Tpow[j]; + num_up+=div; + } + num_down=0; + for(j=1;j<=N2-1;j+=2){ + div=i & X->Def.Tpow[j]; + div=div/X->Def.Tpow[j]; + num_down+=div; + } - tmp_1 = Binomial(all_up,X->Def.Nup-num_up,comb,all_up); - tmp_2 = Binomial(all_down,X->Def.Ndown-num_down,comb,all_down); - jb += tmp_1*tmp_2; - } + tmp_res = X->Def.Nsite%2; // even Ns-> 0, odd Ns -> 1 + all_up = (X->Def.Nsite+tmp_res)/2; + all_down = (X->Def.Nsite-tmp_res)/2; + + tmp_1 = Binomial(all_up,X->Def.Nup-num_up,comb2,all_up); + tmp_2 = Binomial(all_down,X->Def.Ndown-num_down,comb2,all_down); + jb += tmp_1*tmp_2; + } + free_li_2d_allocate(comb2); + if(mythread != nthreads-1) jbthread[mythread+1] = jb; + #pragma omp barrier + #pragma omp single + { + jbthread[0] = 0; + for(j=1;jDef.Ne; if(X->Def.Ne > X->Def.Nsite){ iMinup = X->Def.Ne-X->Def.Nsite; iAllup = X->Def.Nsite; } - for(ib=0;ibCheck.sdim;ib++){ - list_jb[ib]=jb; - i=ib*ihfbit; - num_up=0; - for(j=0;j<=N2-2;j+=2){ - div=i & X->Def.Tpow[j]; - div=div/X->Def.Tpow[j]; - num_up+=div; + jbthread = lui_1d_allocate(nthreads); + #pragma omp parallel default(none) \ + shared(X,iMinup,iAllup,list_jb,ihfbit,N2,nthreads,jbthread) \ + private(ib,i,j,num_up,num_down,div,tmp_res,tmp_1,tmp_2,iSpnup,jb,all_up,all_down,comb2, \ + mythread,sdim_rest,sdim_div,ib_start,ib_end) + { + jb = 0; + iSpnup=0; +#ifdef _OPENMP + mythread = omp_get_thread_num(); +#else + mythread = 0; +#endif + comb2 = li_2d_allocate(X->Def.Nsite+1,X->Def.Nsite+1); + // + // explict loop decomposition is nessesary to fix the asignment to each thread + // + sdim_div = X->Check.sdim / nthreads; + sdim_rest = X->Check.sdim % nthreads; + if(mythread < sdim_rest){ + ib_start = sdim_div*mythread + mythread; + ib_end = ib_start + sdim_div + 1; } - num_down=0; - for(j=1;j<=N2-1;j+=2){ - div=i & X->Def.Tpow[j]; - div=div/X->Def.Tpow[j]; - num_down+=div; + else{ + ib_start = sdim_div*mythread + sdim_rest; + ib_end = ib_start + sdim_div; } - tmp_res = X->Def.Nsite%2; // even Ns-> 0, odd Ns -> 1 - all_up = (X->Def.Nsite+tmp_res)/2; - all_down = (X->Def.Nsite-tmp_res)/2; - - for(iSpnup=iMinup; iSpnup<= iAllup; iSpnup++){ - tmp_1 = Binomial(all_up, iSpnup-num_up,comb,all_up); - tmp_2 = Binomial(all_down, X->Def.Ne-iSpnup-num_down,comb,all_down); - jb += tmp_1*tmp_2; + // + for(ib=ib_start;ibDef.Tpow[j]; + div=div/X->Def.Tpow[j]; + num_up+=div; + } + num_down=0; + for(j=1;j<=N2-1;j+=2){ + div=i & X->Def.Tpow[j]; + div=div/X->Def.Tpow[j]; + num_down+=div; + } + tmp_res = X->Def.Nsite%2; // even Ns-> 0, odd Ns -> 1 + all_up = (X->Def.Nsite+tmp_res)/2; + all_down = (X->Def.Nsite-tmp_res)/2; + + for(iSpnup=iMinup; iSpnup<= iAllup; iSpnup++){ + tmp_1 = Binomial(all_up, iSpnup-num_up,comb2,all_up); + tmp_2 = Binomial(all_down, X->Def.Ne-iSpnup-num_down,comb2,all_down); + jb += tmp_1*tmp_2; + } } - } + free_li_2d_allocate(comb2); + if(mythread != nthreads-1) jbthread[mythread+1] = jb; + #pragma omp barrier + #pragma omp single + { + jbthread[0] = 0; + for(j=1;j stan.in < reference.dat < paste.dat +diff=`awk 'BEGIN{diff=0.0} {diff+=sqrt(($2-$3)*($2-$3))} END{printf "%8.6f", diff}' paste.dat` +test "${diff}" = "0.000000" + +exit $? diff --git a/tool/greenr2k.F90 b/tool/greenr2k.F90 index 0ac407ea8..1472978f3 100644 --- a/tool/greenr2k.F90 +++ b/tool/greenr2k.F90 @@ -467,10 +467,10 @@ END SUBROUTINE set_kpoints SUBROUTINE read_corrindx() ! USE fourier_val, ONLY : file_one, file_two, ncor1, ncor2, ncor, indx, & - & calctype, nr, rindx, orb, norb + & calctype, nr, rindx, orb, norb, irv IMPLICIT NONE ! - INTEGER :: fi = 10, itmp(8), icor + INTEGER :: fi = 10, itmp(8), icor, ir, iorb, jorb CHARACTER(100) :: ctmp ! WRITE(*,*) @@ -495,7 +495,14 @@ SUBROUTINE read_corrindx() ! ncor(1:2) = 0 DO icor = 1, ncor1 + ! READ(fi,*) itmp(1:4) + ! + IF(ANY(irv(1:3,1,rindx(itmp(1)+1)) /= 0)) THEN + WRITE(*,'(a,i0,a)') " REMARK : The left operator at # ", icor, " is not at R=0." + CYCLE + END IF + ! IF(itmp(2) == 0 .AND. itmp(4) == 0) THEN ! ! Up-Up correlation @@ -533,6 +540,11 @@ SUBROUTINE read_corrindx() READ(fi,*) itmp(1:8) ! IF(itmp(1) == itmp(3) .AND. itmp(5) == itmp(7)) THEN + ! + IF(ANY(irv(1:3,1,rindx(itmp(1)+1)) /= 0)) THEN + WRITE(*,'(a,i0,a)') " REMARK : The left operator at # ", icor, " is not at R=0." + CYCLE + END IF ! IF(itmp(2) == 0 .AND. itmp(4) == 0) THEN ! @@ -583,6 +595,11 @@ SUBROUTINE read_corrindx() END IF ! IF(calctype == 4 .AND. (itmp(1) == itmp(7) .AND. itmp(3) == itmp(5))) THEN + ! + IF(ANY(irv(1:3,1,rindx(itmp(1)+1)) /= 0)) THEN + WRITE(*,'(a,i0,a)') " REMARK : The left operator at # ", icor, " is not at R=0." + CYCLE + END IF ! ! S+S- & S-S+ for mVMC ! @@ -602,6 +619,35 @@ SUBROUTINE read_corrindx() ! END DO ! + IF(COUNT(indx(1:nr,3:8,1:norb,1:norb) == 0) /= 0) THEN + WRITE(*,*) "ERROR! The following correlation function is missed:" + WRITE(*,*) "R, kind, orb1, orb2" + DO icor = 3, 8 + DO ir = 1, nr + DO iorb = 1, norb + DO jorb = 1, norb + IF(indx(ir,icor,iorb,jorb) == 0) THEN + IF(icor == 3) THEN + WRITE(*,'(i0,a,i0,2x,i0)') ir, " Up-Up-Up-Up ", iorb, jorb + ELSE IF(icor == 4) THEN + WRITE(*,'(i0,a,i0,2x,i0)') ir, " Up-Up-Down-Down ", iorb, jorb + ELSE IF(icor == 5) THEN + WRITE(*,'(i0,a,i0,2x,i0)') ir, " Down-Down-Up-Up ", iorb, jorb + ELSE IF(icor == 6) THEN + WRITE(*,'(i0,a,i0,2x,i0)') ir, " Down-Down-Down-Down ", iorb, jorb + ELSE IF(icor == 7) THEN + WRITE(*,'(i0,a,i0,2x,i0)') ir, " Up-Down-Down-Up ", iorb, jorb + ELSE + WRITE(*,'(i0,a,i0,2x,i0)') ir, " Down-Up-Up-Down ", iorb, jorb + END IF + END IF + END DO + END DO + END DO + END DO + STOP "Missing indices for the Green function." + END IF + ! WRITE(*,*) " Number of UpUpUpUp Index : ", COUNT(indx(1:nr, 3, 1:norb, 1:norb) /= 0) WRITE(*,*) " Number of UpUpDownDown Index : ", COUNT(indx(1:nr, 4, 1:norb, 1:norb) /= 0) WRITE(*,*) " Number of DownDownUpUp Index : ", COUNT(indx(1:nr, 5, 1:norb, 1:norb) /= 0) @@ -867,7 +913,13 @@ SUBROUTINE output_cor() END DO ! DO ik = 1, ikk - WRITE(fo,'(1000e15.5)') xk(ik), cor_ave(ik,1:6, 1:norb, 1:norb), cor_err(ik,1:6, 1:norb, 1:norb) + WRITE(fo,'(e15.5)',advance="no") xk(ik) + DO iorb = 1, norb + DO jorb = 1, norb + WRITE(fo,'(24e15.5)',advance="no") cor_ave(ik,1:6, jorb, iorb), cor_err(ik,1:6, jorb, iorb) + END DO + END DO + WRITE(fo,*) END DO ! CLOSE(fo)