Top page

AlmaLinux インストールメモ

AlmaLinux 9をインストールした際の注意点についてメモを追加していきます

C/C++/Fortranの開発環境、python3 をインストールしていることを前提としています

問題点:


環境設定 (研究室内部)

  1. NAS [share]/config/AlmaLinux-sv

追加パッケージのインストール

yumはdnfに読み替えても大丈夫です

  1. python-devel
    # yum install python-devel
  2. xterm (Launcher.pyデフォルトターミナル)
    # yum install xterm
  3. konsole (好み次第)
    # yum install konsole
  4. fftw3 (VASP etc)
    # yum install fftw3
    # yum install fftw3-devel
  5. gtk3
    # dnf install gtk3
    # dnf install gtk3-devel
  6. libGLU
    # dnf install libGLU
    # dnf install libGLU-devel
  7. libglut
    (i) freeglut-3.4.0をダウンロード、展\開
    % cd freeglut-3.4.0
    % cmake .
    % make
    # make install

以下は必要に応じて

  1. cpuid: CPU情報 (L1キャッシュなど)
    # yum install cpuid
  2. gfortran (WIEN2k)
    # yum install gfortan
  3. tsch (WIEN2k, XCrySDen)
    # yum install tsch
  4. gnuplot (optional for WIEN2k)
    # yum install gnuplot
  5. X11/Xlib.h
    # yum install libXt-devel
  6. cmake
    # yum install cmake
  7. lapack, blas
    # yum install lapack blas

pythonモジュールのインストール

% pip install numpy scipy matplotlib seaborn scikit-learn chardet openpyxl pandas

% pip install tkinter    # 下記トラブルシューティング参考
 
python/tkinterのインストール: python3.9.14がインストールされていましたが、pipではtkinterはインストールできません
     (packageが見つかりません)。
      Linuxのパッケージ管理ツール (yum, dnf, apt-get) でインストールします。
# yum install python-tkinter (Linux versionによってはpython3-tkinter, python3-tkなど)

% pip install physbo    # bayes_gp_*.pyを使う場合。下記トラブルシューティング参考
 pipでのインストールの際、「致命的エラー: Python.h: そのようなファイルやディレクトリはありません」 が出たら、
  python-develをインストールしてください。
  # yum install python-devel

poetry
# pip install poetry


perlモジュール のインストール (perlプログラムを使う場合)

研究用プログラム
# cpan install Jcode File::Copy::Recursive Math:Matrix Math::MatrixReal Math::Vector::Real

perl/tkのインストール

  1. Tk-804.036.tar.gz を入手
  2. % tar xvfz Tk-804.036.tar.gz
  3. % cd Tk-804.036
  4. % perl Makefile.PL
  5. % make
  6. # make install

CGIプログラム
# cpan install CGI::Carp MIME::Lite

Perlの注意: use encodeがobsoleteになり、use utf8を使い、スクリプトはutf8で保存する必要あり。その他、調整が必要


その他

# python -m pip install --upgrade pip setuptools

  1. phonopy
    # pip install phonopy
  2. phono3py
  3. spglib
    # pip install spglib
  4. alamode
  5. pymatgen
    # pip install pymatgen
  6. CrySPY
    https://tomoki-yamashita.github.io/CrySPY_doc/installation/index.html
    # pip install csp-cryspy
  7. VASPKIT
    https://vaspkit.com/
  8. VESTA
    https://jp-minerals.org/vesta/jp/
    (i) VESTA-gtk3.tar.bz2をダウンロード
    (ii) % bunzip VESTA-gtk3.tar.bz2

Intel compiler (oneAPI) のインストール

URL: https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.html

  1. .bashrcに追加: source /opt/intel/oneapi/setvars.sh intel64
  2. libfftw3xf.aの作成:
    # cd /opt/intel/oneapi/mkl/2023.1.0/interfaces/fftw3xf
    # make

wannier90 のコンパイル

URL: http://www.wannier.org/download/

  1. make.incをコピー
    % cp config/make.inc.ifort make.inc
  2. make.incのLIBDIRを編集
    LIBDIR=/opt/intel/oneapi/mkl/2023.1.0/libintel64
  3. make実行
    % make

VASP のコンパイル

URL: https://www.vasp.at/wiki/index.php/Installing_VASP.6.X.X
    https://www.xlsoft.com/jp/blog/intel/2021/10/29/building-vasp-with-intel-mkl-and-intel-compilers/
        https://www.vasp.at/wiki/index.php/Makefile.include

  1. % cp arch/makefile.include.intel  ./makefile.include
  2. Intel MKLのパス を設定
    MKLROOT ?= /opt/intel/oneapi/mkl/2023.1.0/lib/intel64/
  3. https://qiita.com/youkihashimoto3110/items/a5c728d246d9ed4c96c4
    にしたがってCPU coreのL1キャッシュを設定。
    cpuidで調べて、命令キャッシュは32kB、データキャッシュは48kBということなので、とりあえず
      -DMPI__BLOCK=32000   (多分、49152が最適)
      -DCACHE_SIZE=16000   (多分、24576が最適)
    に変更
  4. % make all

bader のインストール

http://theory.cm.utexas.edu/henkelman/code/bader/

  1. % tar xvfz bader_lnx_64.tar.gz
  2. Windows + Intel oneAPI ifort の場合 (makefile.win_ifort)
    % make -f makefile.win_ifort
    Linuxではすでにコンパイルしていたbinaryを使ったので、makeは未確認
    makefile.lnx.ifortに .f の設定を追加する必要があるかも。
    % make -f makefile.lnx_ifort

VTST scripts のインストール

https://theory.cm.utexas.edu/vtsttools/scripts.html

  1. % tar xvfz vtstscripts.tgz

raman-sc のインストール (python2)

https://github.com/raman-sc/VASP

  1. ZIPファイルをダウンロード
  2. % unzip VASP-master.zip
  3. % mv VASP-master raman-sc

WIEN2k のコンパイル

  1. % ./siteconfig

py4vasp pythonモジュールのインストール  未完了です

  1. % git clone https://github.com/vasp-dev/py4vasp.git
  2. % cd py4vasp
  3. # pip install .

XCrySDen のインストール 未完了です

URL: http://www.xcrysden.org/doc/install.html

  1. Togl2なども必要ですが、Togl2.0のインストールでは、Tcl configuration definitionが見つからないといエラーが出ます (Tclはインストールされています)。
    XCrySDen source packageのmakeで必要なファイルをインストールしてくれるとのことです。が、うまくいっていません

一般的なLinux tips