User Tools

Site Tools


Sidebar

quantumespresso:インストール方法_7.3

OSは Ubuntu 22.04 を使いました。

必要なソフトウェア

事前にMPIのライブラリをインストールしてください。 (一応、設定ではserial計算も可能です。)

さらに、事前にgitも必要です。

$ sudo apt install git

QuantumESPRESSOのインストール

Quantum ESPRESSOのパッケージはhttp://www.quantum-espresso.org/からダウンロードできます。 ページ上部メニューから[DOWNLOAD]を選び、横のメニューバーにある [Download page] からダウンロードできます。 ダンロードしたファイルはホーム・ディレクトリに保存します。 Linuxのターミナル(端末)を開き、次のように入力してダウンロードしたファイルを解凍し、解凍したディレクトリの中に入ります。

$ tar -xzvf qe-7.3-ReleasePack.tgz
$ cd qe-7.3

あるいはGitHub https://github.com/QEF/q-e/ から直接入手できます

$ git clone https://github.com/QEF/q-e.git
$ cd q-e

以下では ~/qe-7.3/ にQuantumESPRESSOがインストールされるとします。

Quantum ESPRESSOのインストールに必要な設定をします。

$ ./configure F90=gfortran F77=gfortran CC=gcc MPIF90=mpif90 --enable-openmp --enable-parallel  $ GNUコンパイラ
$ ./configure MPIF90=mpiifort F90=ifort F77=ifort CC=icc --enable-openmp --enable-parallel --with-scalapack=intel   # Intel OneAPI
$ make all
  • --enable-openmp … OpenMPを使用した並列計算を自動的に行います
  • --enable-parallel … MPIを使用した並列計算を行います。実はこのフラグをつけなくてもデフォルトでMPIを使用するので、MPIを使用したくない場合は --enable-parallel=no としてください。
  • --with-scalapack=intel … Intelコンパイラに同梱のScalapackを使用します
    • 詳しくはインストールマニュアルを参照してください。

GNUコンパイラを使う場合でも、MKLが入っていれば自動でMKLを使用します。

makeには時間がかかるので、のんびり終わるのを待ちます。 コンパイルが終了したら、ホーム・ディレクトリにある.bashrc を編集します。

$ gedit ~/.bashrc

でファイルを開き、ファイルの一番最後の行に次の一文を書き加えます。

export PATH=$PATH:/home/username/qe-7.3/bin/

ファイルを保存、終了して端末に戻り、 .bashrc を読み込んでインストールが完了します。

$ source ~/.bashrc

あるいはコンピュータを再起動することでもインストールが完了します。

Wannier90のインストールに失敗する

次のエラーメッセージが出て、makeが止まりました。

( cd install ; make -f plugins_makefile w90 || exit 1 )
make[1]: Entering directory '/home/username/qe-7.3/install'
initializing external/wannier90 submodule ...
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /home/username/qe-7.3/external/wannier90/.git/
usage: git remote add [<options>] <name> <url>

    -f, --fetch           fetch the remote branches
    --tags                import all tags and associated objects when fetching
                          or do not fetch any tag at all (--no-tags)
    -t, --track <branch>  branch(es) to track
    -m, --master <branch>
                          master branch
    --mirror[=(push|fetch)]
                          set up remote as a mirror to push to or fetch from

fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: 'FETCH_HEAD' is not a commit and a branch 'recorded_HEAD' cannot be created from it
make[1]: *** [plugins_makefile:88: w90] Error 128
make[1]: Leaving directory '/home/username/qe-7.3/install'
make: *** [Makefile:244: w90] Error 1

Wannier90のディレクトリに入って、Wannier90を自らとってきます。

$ cd external/
$ rm -rf wannier90/
$ git clone https://github.com/wannier-developers/wannier90.git wannier90

QEのインストールを再開します。

$ cd ..
$ make all

最後にWannier90のコンパイルを完了させます(QEのインストール完了よりも先にしても失敗する)。

$ cd external/wannier90
$ make

XCrySDenのインストール

XCrySDenは結晶構造やフェルミ面、電荷密度分布といったものを3Dで表示するソフトです。 入れておくと大変便利です。

UbuntuなどのDebian系でapt-getが使えれば、インストールは極めて簡単です。 端末を開いて

$ sudo apt-get install xcrysden

でインストールが完了します。

いろいろな汎関数を使いたい

  • 密度汎関数理論で使われる交換相関汎関数は、現在もいろいろな形のものが日々考案されています。
  • 通常はQuantumESPRESSO本体に含まれている交換相関汎関数で十分です
    • 汎関数の種類は非常に多く、シチュエーションによってどの汎関数を選べば良いのかという明確な指針も存在しないため、このオプションは専門家向けです
  • 事前にLibxcをインストールしておけば、configureを次のようにしてLibxcに実装されている汎関数を使用できます
    ./configure --with-libxc --with-libxc-prefix='/opt/etsf'
  • /opt/etsf はLibxcをインストールしたディレクトリで、デフォルトから変更した場合はそれに合わせてください
  • 使用できる汎関数の種類の一覧は ~/qe-6.7/Modules/funct.f90 のコメントに書いてあります
quantumespresso/インストール方法_7.3.txt · Last modified: 2024/02/05 00:00 by koudai