地域密着型エリア広告配信リクルートの地域密着型広告ドコイク?アドネットワーク Ads by ドコイク?[無料でホームページを作成] [通報・削除依頼]
[無料でホームページを作成] [通報・削除依頼]

Ubuntu 16.04 LTS (64bit) beginners' course

   Ubuntu 16.04 LTS amd64 (64 bit版)をインストールし、第一原理計算コードをセットアップするまでを解説する
------------------------------------------------------------------------------
■ sudo apt-get install

# Update
sudo apt-get update

# Compiler (Intel compiler need g++)
sudo apt-get -y install g++ build-essential
sudo apt-get -y install gfortran

# Script (WIEN2k use csh and tcsh)
sudo apt-get -y install csh tcsh

# XcrySDen
sudo apt-get -y install tk tcl tclx

# Plot soft (WIEN2k use gnuplot)
sudo apt-get -y install gnuplot grace rasmol xterm

# phonopy
sudo apt-get -y install python-dev python-numpy python-matplotlib python-yaml python-h5py

# phono3py
sudo apt-get -y install libgomp1 liblapack-dev liblapacke-dev

# BoltzTraP (for VASP)
sudo apt-get -y install python-ase

# SPR-KKR
sudo apt-get -y install imagemagick graphicsmagick-imagemagick-compat iwidgets4

# python
sudo apt-get -y install python-tk python-lxml python-scipy python-setuptools texlive

# Patch
sudo apt-get -y install patch

other method: Ubuntu Software Center > gfortran
-----------------------------------------------------------------------------
■ Intel compiler (parallel_studio_xe_2016_update4)
Rough process
1. tar zxvf $HOME/Downloads/parallel_studio_xe_2016_update4.tgz
2. cd par*
3. sudo ./install.sh
4. Please type a selection or press "Enter" to accept default choice [1]: Enter
5. space
6. accept
7. Please type a selection or press "Enter" to accept default choice [1]: Enter
8. Serial number
9. Press "Enter" key to continue: Enter
10. Please type a selection: 1
11. Please type a selection or press "Enter" to accept default choice [1]:
12. space
13. accept
14. all enter

15. gedit $HOME/.bashrc
#--------------------
# Intel Compiler ( Fortran & C++ ) environmental setting
export PATH=$PATH:/opt/intel/vtune_amplifier_xe
export PATH=$PATH:/opt/intel/inspector_xe
source /opt/intel/bin/compilervars.sh intel64
# mpiifort (intel mpi)
source /opt/intel/impi/5.1.3.258/bin64/mpivars.sh
#--------------------

# FFT
1. bash
2. sudo bash
3. cd /opt/intel/composer_xe_2013/mkl/interfaces/fftw3xf/
4. make libintel64 compiler=intel

[1] https://software.intel.com/en-us/articles/how-to-run-intel-mpi-on-xeon-phi
-----------------------------------------------------------------------------
OpenMPI
1. download: http://www.open-mpi.org/
2. tar zxvf $HOME/Downloads/openmpi-2.0.2.tar.gz
3. cd openmpi*
4. ./configure -prefix=$HOME/openmpi CXX=icpc CC=icc FC=ifort F90=ifort F77=ifort
5. make
6. make install
----------
7. gedit ~/.bashrc
#--------------------
# OpenMPI environmental setting
export MPIROOT=$HOME/openmpi
export PATH=$MPIROOT/bin:$PATH
export LD_LIBRARY_PATH=$MPIROOT/lib:$LD_LIBRARY_PATH
export MANPATH=$MPIROOT/share/man:$MANPATH
#--------------------

------------------------------------------------------------------------------
■ cif2cell
1. tar zxvf cif2cell-1.2.10.tar.gz
2. cd cif2cell-1.2.10
3. gedit cif2cell
----------
before-----line 1608 (shortcut command: Ctrl + I )
incarfile = INCARFile(cd,docstring=docstring,vca=options.vca,prioritylist=prioritylist,encutfac=encutfac)

after-------line 1608
incarfile = INCARFile(cd,docstring=docstring,potcardir=lib,vca=options.vca,prioritylist=prioritylist,encutfac=encutfac)
----------
4. sudo python setup.py install
------------------------------------------------------------------------------
■ XcrySDen
1) download: http://www.xcrysden.org/Download.html
2) tar zxvf $HOME/Downloads/xcrysden-1.5.60-linux_x86_64-semishared.tar.gz
3) cd xcr*
4) gedit $HOME/.bashrc
#--------------------
# xcrysden
XCRYSDEN_TOPDIR=$HOME/xcrysden-1.5.60-bin-semishared
XCRYSDEN_SCRATCH=$HOME/xcrys_tmp
export XCRYSDEN_TOPDIR XCRYSDEN_SCRATCH
PATH="$XCRYSDEN_TOPDIR:$PATH:$XCRYSDEN_TOPDIR/scripts:$XCRYSDEN_TOPDIR/util"
#--------------------
------------------------------------------------------------------------------
■ VESTA
1. download: http://jp-minerals.org/vesta/jp/
2. tar xvf $HOME/Downloads/VESTA-x86_64.tar.bz2
3. ./VESTA
------------------------------------------------------------------------------
■ WIEN2k
1) mkdir WIEN2k_16
2) cd WIEN2k_16
3) cp $HOME/Downloads/WIEN2k_16.tar ./
4) tar xvf WIEN2k_16.tar
5) gunzip *.gz
6) chmod +x ./expand_lapw
----------
7) ./expand_lapw
  WARNING: This will expand all WIEN.tar files !!!
It will overwrite all changes you have made previously in the WIEN subdirectories
continue (y/n)
y
-----------
8) ./siteconfig_lapw
  Press RETURN to continue
  Enter
----------
9) I    Linux (Intel ifort compiler (12.0 or later)+mkl (+intelmpi))
  i
  Press RETURN to continue
  Enter
----------
10) Your compiler: ifort
  Your compiler: icc
  Press RETURN to continue
  Enter
  Hit Enter to continue
  Enter
----------
11) Current settings:
 O   Compiler options:        -O1 -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML -traceback -assume buffered_io -I$(MKLROOT)/include -axAVX2,AVX,SSE4.2
 F   FFTW options:            
 X   LIBX options:            
 E   ELPA options:            
 L   Linker Flags:            $(FOPT) -L$(MKLROOT)/lib/$(MKL_TARGET_ARCH) -pthread
 P   Preprocessor flags       '-DParallel'
 R   R_LIB (LAPACK+BLAS):     -lmkl_lapack95_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread
 FL  FFTW_LIBS:                    
 XL  LIBXC_LIBS:                   
 EL  ELPA_LIBS:     
 S   Save and Quit
 Q   Quit and abandon changes
     To change an item select option.
Selection: s
----------
12) Configure parallel execution  *
  If you have A CLUSTER OF shared memory parallel computers answer next question with N
  Shared Memory Architecture? (y/N):y
  Do you know/need a command to bind your jobs to specific nodes ?
  (like taskset -c). Enter N / your_specific_command:
   ********************************************************
   Do you have MPI, Scalapack, ELPA, and FFTW installed and intend to run
   finegrained parallel?
   This is useful only for BIG cases (50 atoms and more / unit cell)
   and your HARDWARE has at least 16 cores (or is a cluster with Infiniband)
   You need to KNOW details about your installed MPI, ELPA, and FFTW )
   (y/n) n
13)     Change parameters in:
    1   lapw1  (e.g. NMATMAX, NUME)
    A   all programs (usually not necessary)
    Q   to quit
     Selection: q
----------
14) A   Compile all programs (suggested)
  a
----------
15) ./userconfig_lapw
     Setting up user: wien2k2    
     Home directory:  /home/wien2k2
     Shell:           bash

     Specify your prefered editor (default is emacs):
     editor shall be: gedit

     Set editor to  gedit (Y/n) y

     Specify your prefered DATA directory, where your cases should be
     stored (for  /home/wien2k2/WIEN2k, just enter RETURN key):
     DATA directory: /home/wien2k2/WIEN2k_DATA

     Set DATA directory to  /home/wien2k2/WIEN2k_DATA (Y/n) y

     Specify your prefered scratch directory, where big case.vector files
     can be stored (Recommended is your working dir., just enter RETURN key):
     scratch directory: /home/wien2k2/WIEN2k_DATA

     Set scratch directory to  /home/wien2k2/WIEN2k_DATA (Y/n) y

     Specify your program to read pdf files (default is acroread)
     (on some Linux systems use xpdf):

     Set PDFREADER to  acroread (Y/n) y

     Do you want to continue (Y/n)? y

     Edit .rhosts file now? (y/N) N
----------
16) gedit $HOME/.bashrc
  export OMP_NUM_THREADS=4
----------
17) bash
----------
18) w2web
Please enter the username: [admin] XYZABC
Please enter the password: [password] XYZABC
wien2k:wien2k
Remember these. You will need them when you log in.

Select the port to run on: [7890]
Running on port 7890

Please enter this system's hostname: [wien2k2-PC]
Using wien2k2-PC

Is this your master node?: [y] y
----------
My PC: Intel(R) Xeon(R)  E5-2640 v3 (can use SSE4.1/4.2, AVX 2.0), see cpuinfo and web

other information
(Youtube: https://www.youtube.com/watch?v=NBmQQnBSNi0, https://www.youtube.com/watch?v=zby6N3x14Vo)
------------------------------------------------------------------------------
■ boltztrap
1. tar xvf BoltzTraP.tar.bz2
2. cd bol*/src
3. gedit Makefile
   FC=ifort
   FOPT = -FR -mp1 -w -prec_div -pc80 -pad -align -DINTEL_VML -traceback -axAVX,SSE4.2,SSE4.1,SSSE3,SSE3
   LDFLAGS = $(FOPT) -L$(MKLROOT)/lib/$(MKL_TARGET_ARCH) -pthread
   LIBS = -lmkl_lapack95_lp64 -lmkl_blas95_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread
4. make
------------------------------------------------------------------------------
■ spglib
1. download: https://sourceforge.net/projects/spglib/
2. tar zxvf spg*
3. cd spg*
4. ./configure
5. make
6. sudo make install
------------------------------------------------------------------------------
■ pyspglib-1.8.3.1 (BoltzTraP for VASP)
1. download: https://pypi.python.org/pypi/pyspglib
2. tar zxvf pys*
3. cd pys*
4. sudo python setup.py install
------------------------------------------------------------------------------
■ vasp.5.4
(Youtube: https://www.youtube.com/watch?v=zczPEKRHfwU)
1. tar zxvf vasp.5.4.1.05Feb16.tar.gz
2. cd vasp.5.4.1
3. gunzip patch.5.4.1.14032016.gz
    gunzip patch.5.4.1.03082016.gz
(get them from http://cms.mpi.univie.ac.at/wiki/index.php/Installing_VASP#Adapting_makefile.include)
4. patch -p0 < patch.5.4.1.14032016
    patch -p0 < patch.5.4.1.03082016
5. cp arch/makefile.include.linux_intel makefile.include
6. gedit makefile.include
# ----- copy&paste is OK ! -----
# Precompiler options
CPP_OPTIONS= -DMPI -DHOST=\"IFC91_ompi\" -DIFC \
             -DCACHE_SIZE=4000 -DPGF90 -Davoidalloc \
             -DMPI_BLOCK=8000 -Duse_collective \
             -DnoAugXCmeta -Duse_bse_te \
             -Duse_shmem -Dtbdyn

CPP        = fpp -f_com=no -free -w0  $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)

FC         = mpif90
FCL        = mpif90 -mkl

FREE       = -free -names lowercase

FFLAGS     = -assume byterecl
OFLAG      = -O2 -axAVX2,AVX,SSE4.2
OFLAG_IN   = $(OFLAG)
DEBUG      = -O0

MKL_PATH   = $(MKLROOT)/lib/intel64
BLAS       =
LAPACK     =
BLACS      = -lmkl_blacs_openmpi_lp64
SCALAPACK  = $(MKL_PATH)/libmkl_scalapack_lp64.a $(BLACS)

OBJECTS    = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o \
             $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a
INCS       =-I$(MKLROOT)/include/fftw

LLIBS      = $(SCALAPACK) $(LAPACK) $(BLAS)

OBJECTS_O1 += fft3dfurth.o fftw3d.o fftmpi.o fftmpiw.o
OBJECTS_O2 += fft3dlib.o

# For what used to be vasp.5.lib
CPP_LIB    = $(CPP)
FC_LIB     = $(FC)
CC_LIB     = icc
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB   = $(FREE)

OBJECTS_LIB= linpack_double.o getshmem.o

# Normally no need to change this
SRCDIR     = ../../src
BINDIR     = ../../bin
# -----
7. make all

□ Usage
(4 core {8 threads} case)
export OMP_NUM_THREADS=1
mpirun -np 4 $HOME/vasp.5.4.1/bin/vasp_std

(6 core {12 threads} case)
export OMP_NUM_THREADS=1
mpirun -np 6 $HOME/vasp.5.4.1/bin/vasp_std

(8 core {16 threads} case)
export OMP_NUM_THREADS=1
mpirun -np 8 $HOME/vasp.5.4.1/bin/vasp_std

(10 core {20 threads} case)
export OMP_NUM_THREADS=1
mpirun -np 10 $HOME/vasp.5.4.1/bin/vasp_std
------------------------------------------------------------------------------
■ Recompile (for Phonon calculation error case)
--------- for example, if you can get follwoing errors
    internal error in SETUP_DEG_CLUSTERS: NB_TOT exceeds NMAX_DEG
    increase NMAX_DEG to         144
---------

1. cd $HOME/vasp.5.3
2. grep NMAX_DEG *.F
 You get "subrot_cluster.F:    INTEGER, PARAMETER :: NMAX_DEG=48"
-----
3. gedit subrot_cluster.F
-----before-----
    INTEGER, PARAMETER :: NMAX_DEG=48
-----after-----
    INTEGER, PARAMETER :: NMAX_DEG=168
-----
4. make

※ VASPはCとFortranのプリプロセッサ(cppとfpp)を用いて、.Fの拡張子がついたファイルをコンパイルするPCの環境に合わせたものに書き換えて.f90の拡張子がついたものとして出力する。コードを書き換える場合には、.Fの拡張子を書き換えておくと安心できる。
(VASP makefile copy subrot_cluster.F to subrot_cluster.f90)
------------------------------------------------------------------------------
■ potpaw_PBE
1. mkdir potpaw_PBE
2. cd potpaw_PBE
3. tar zxvf potpaw_PBE.54.tgz
------------------------------------------------------------------------------
■ Phonopy
1) download phonopy: https://pypi.python.org/pypi/phonopy
2) tar zxvf phonopy-1.11.10.59.tar.gz
3) cd phonopy*
4) sudo python setup.py install
------------------------------------------------------------------------------
■ Phono3py
1) download phono3py: https://pypi.python.org/pypi/phono3py
2) tar zxvf phono3py-1.11.11.92.tar.gz
3) cd phono3py*
4) sudo python setup.py install
------------------------------------------------------------------------------
■ PWscf
1. tar zxvf $HOME/Downloads/qe-6.1.tar.gz
2. cd qe-6.1
3. ./configure MPIF90=mpif90  FFLAGS="-axAVX2,AVX,SSE4.2 -O2 -assume byterecl -g -traceback" CXX=icpc CC=icc BLAS_LIBS="${MKLROOT}/lib/intel64/libmkl_blas95_lp64.a ${MKLROOT}/lib/intel64/libmkl_lapack95_lp64.a -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lpthread -lm -ldl" LAPACK_LIBS="${MKLROOT}/lib/intel64/libmkl_blas95_lp64.a ${MKLROOT}/lib/intel64/libmkl_lapack95_lp64.a -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lpthread -lm -ldl" --enable-openmp
4. make all

◇ Usage
(4 core {8 threads} case)
export OMP_NUM_THREADS=1
mpirun -np 4 $HOME/qe-6.1/bin/pw.x < case.in > case.out

(6 core {12 threads} case)
export OMP_NUM_THREADS=1
mpirun -np 6 $HOME/qe-6.1/bin/pw.x < case.in > case.out

(8 core {16 threads} case)
export OMP_NUM_THREADS=1
mpirun -np 8 $HOME/qe-6.1/bin/pw.x < case.in > case.out

(10 core {20 threads} case)
export OMP_NUM_THREADS=1
mpirun -np 10 $HOME/qe-6.1/bin/pw.x < case.in > case.out

◇ pslibarary
(Youtube: https://www.youtube.com/watch?v=G77ZwxBINo0)
URL: http://www.qe-forge.org/gf/project/pslibrary/frs/?action=FrsReleaseBrowse&frs_package_id=41
1. tar zxvf pslibrary.1.0.0.tar.gz
2. cd psl*
3. gedit QE_path
-----
PWDIR=$HOME/qe-6.1
-----
4. make_all_ps
------------------------------------------------------------------------------
■ Abinit
1. tar zxvf $HOME/Downloads/abinit-8.2.3.tar.gz
2. cd abinit-8.2.3
3. ./configure FC=mpif90 CC=mpicc CXX=mpic++ --with-linalg-flavor="mkl" --with-linalg-incs="-I/opt/intel/compilers_and_libraries/linux/mkl/include/intel64/lp64 -I/opt/intel/compilers_and_libraries/linux/mkl/include" --with-linalg-libs="-L/opt/intel/compilers_and_libraries/linux/mkl/lib/intel64 -lmkl_blas95_lp64 -lmkl_lapack95_lp64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lmkl_blacs_intelmpi_lp64 -lpthread -lm -ldl"  --enable-64bit-flags FCFLAGS_EXTRA="-O2 -axAVX2,AVX,SSE4.2" CFLAGS_EXTRA="-O2 -axAVX2,AVX,SSE4.2" CXXFLAGS_EXTRA="-O2 -axAVX2,AVX,SSE4.2"
4. make mj4
5. make check
6. sudo make install

◇ Usage
(4 core {8 threads} case)
export OMP_NUM_THREADS=1
mpirun -np 4 abinit < case.in > case.out

(6 core {12 threads} case)
export OMP_NUM_THREADS=1
mpirun -np 6 abinit < case.in > case.out

(8 core {16 threads} case)
export OMP_NUM_THREADS=1
mpirun -np 8 abinit < case.in > case.out

(10 core {20 threads} case)
export OMP_NUM_THREADS=1
mpirun -np 10 abinit < case.in > case.out

◇ JTH-PAW
(Youtube: https://www.youtube.com/watch?v=xR0_VxH77P8)
URL: http://www.abinit.org/downloads/PAW2/index.html
1. tar zxvf JTH-PBE-atomicdata.tar.gz
2. tar zxvf JTH-LDA-atomicdata.tar.gz
------------------------------------------------------------------------------
 
QRコード
携帯用QRコード
アクセス数
ページビュー数