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

Ubuntu 16.04 LTS (64bit)

   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 build-essential
sudo apt-get -y install g++
sudo apt-get -y install gfortran

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

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

# Plot soft (WIEN2k use gnuplot)
sudo apt-get -y install gnuplot
sudo apt-get -y install grace
sudo apt-get -y install rasmol
sudo apt-get -y install 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 install python-ase

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

# python
sudo apt-get -y install python-tk
sudo apt-get -y install python-lxml
sudo apt-get -y install python-scipy
sudo apt-get -y install python-setuptools
sudo apt-get -y install 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
-----------------------------------------------------------------------------
■ FFTW3 (FFTW3 for WIEN2k)
1) tar zxvf $HOME/Downloads/fftw-3.3.5.tar.gz
2) cd ff*
3) ./configure MPICC=mpicc CC=icc F77=ifort --enable-avx2 --enable-mpi
4) make
5) sudo make install
My PC: Intel(R) Core(TM) i7-4770S (can use SSE4.1/4.2, AVX 2.0), see cpuinfo and web
-----------------------------------------------------------------------------
OpenMPI (skip this procedure for intelmpi, home case)

1. download: http://www.open-mpi.org/

2. tar zxvf $HOME/Downloads/openmpi-1.8.8.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
#--------------------
-----------------------------------------------------------------------------
OpenMPI (skip this procedure for intelmpi, root case)

1. download: http://www.open-mpi.org/
2. tar zxvf $HOME/Downloads/openmpi-1.8.8.tar.gz
3. cd op*
4. ./configure CXX=g++ CC=gcc FC=ifort F90=ifort F77=ifort
  or
  ./configure CXX=icpc CC=icc FC=ifort F90=ifort F77=ifort
  or
  ./configure -prefix=/usr/local/openmpi CXX=icpc CC=icc FC=ifort F90=ifort F77=ifort
5. make
   or
   sudo make
6. sudo make install
----------
7. gedit ~/.bashrc
#--------------------
# OpenMPI environmental setting
export MPIROOT=/usr/local/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/xc-1.5.23-linux_x86_64-semishared.tar.gz
3) cd XCr*
4) ./xcConfigure
5) Do you have a CRYSTAL package ([y]es/[n]o): n
6) Is this correct ([y]es/[n]o): y
7) Would you like to add xcrysden icon to the desktop ([y]es/[n]o): n
8) bash
* command: xcrysden
------------------------------------------------------------------------------
■ 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_14
2) cd WIEN2k_14
3) cp $HOME/Downloads/WIEN2k_14.2.tar ./
4) tar -xvf WIEN2k_14.2.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 and later) + mkl )
  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: -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML -traceback -assume buffered_io -axAVX2
  F   FFTW options: -DFFTW3 -I/usr/local/lib/include
  FL  FFTW_LIBS: -lfftw3_mpi -lfftw3 -L/usr/local/lib
----------
12) 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: N
----------
13)    Do you have MPI, Scalapack 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 and FFTW )
   (y/n) y
     Recommended setting for parallel f90 compiler: mpiifort
     Current selection:  
     Your compiler: mpiifort
 Finding the required fftw2/3 mpi-files in /usr and /opt ..../usr/local/lib/libfftw3_mpi.a
could not find fftw ....
Your present FFTW choice is: FFTW3
Please specify whether you want to use FFTW3 (default) or FFTW2  (FFTW3 / FFTW2):
Present FFTWpath is: /usr/local/lib
Please specify the ROOT-path of your FFTW installation (like /opt/fftw3): /usr/local/lib
Your FFTW_LIBS are: -lfftw3_mpi -lfftw3 -L/usr/local/lib/lib
Your FFTW_OPT are : -DFFTW3 -I/usr/local/lib/include
is this correct? enter Y (default) or n: y
FP  FPOPT(par.comp.options): -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML -traceback -assume buffered_io -axAVX2
----------
14) A   Compile all programs (suggested)
  a
----------
15) ./userconfig_lapw
----------
16) .bashrc
  export OMP_NUM_THREADS=4
----------
17) bash
18) w2web
My PC: Intel(R) Core(TM) i7-4770S (can use SSE4.1/4.2, AVX 2.0), see cpuinfo and web
------------------------------------------------------------------------------
■ boltztrap
1. tar xvf BoltzTraP.tar.bz2
2. cd boltztrap-*/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.lib
1. tar zxvf vasp.5.lib.tar.gz
2. cd vasp.5.lib
3. cp makefile.linux_ifc_P4 makefile
4. gedit makefile
  -----(Note: CC=cc)
  CPP     = gcc -E -P -C $*.F >$*.f
  FC=ifort

  CFLAGS = -O
  FFLAGS = -O0 -FI -axAVX2,AVX,SSE4.2,SSE4.1,SSE3,SSSE3,SSE2
  -----
5. make
------------------------------------------------------------------------------
■ vasp.5.3 (OpenMPI)
1. tar zxvf vasp.5.3.3.tar.gz
2. cd vasp.5.3
3. cp makefile.linux_ifc_P4 makefile
4. gedit makefile
  -----
  FC=ifort
  FCL=$(FC)
  CPP_ =  ./preprocess <$*.F | /usr/bin/cpp -P -C -traditional >$*$(SUFFIX)
  CPP_=fpp -f_com=no -free -w0 $*.F $*$(SUFFIX)
  CPP     = $(CPP_)  -DHOST=\"LinuxIFC\" \
          -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc -DNGXhalf \
  FFLAGS =  -FR -names lowercase -assume byterecl
  OFLAG=-O2 -ip -axAVX2,AVX,SSE4.2,SSE4.1,SSE3,SSSE3,SSE2
  OFLAG_HIGH = $(OFLAG)
  OBJ_HIGH =
  OBJ_NOOPT =
  DEBUG  = -FR -O0
  INLINE = $(OFLAG)
  MKL_PATH=$(MKLROOT)/lib/intel64
  MKL_FFTW_PATH=$(MKLROOT)/interfaces/fftw3xf/
  BLAS=
  LAPACK=
  LIB  = -L../vasp.5.lib -ldmy \
     ../vasp.5.lib/linpack_double.o $(LAPACK) \
     $(BLAS)
  FFT3D   = fft3dfurth.o fft3dlib.o
  FC=mpif90
  FCL=$(FC) -mkl
  CPP    = $(CPP_) -DMPI  -DHOST=\"LinuxIFC\" -DIFC \
     -DCACHE_SIZE=4000 -DPGF90 -Davoidalloc -DNGZhalf \
     -DMPI_BLOCK=8000 -Duse_collective -DscaLAPACK
  BLACS= -lmkl_blacs_openmpi_lp64
  SCA= $(MKL_PATH)/libmkl_scalapack_lp64.a $(BLACS)
  LIB     = -L../vasp.5.lib -ldmy  \
      ../vasp.5.lib/linpack_double.o \
      $(SCA) $(LAPACK) $(BLAS)
  FFT3D   = fftmpi.o fftmpi_map.o fft3dfurth.o fft3dlib.o
  -----
5. make
Retry case: gedit makefile > make clean > make

other case
----------
# FFT: fftmpi.o with fft3dlib of Juergen Furthmueller
#FFT3D   = fftmpi.o fftmpi_map.o fft3dfurth.o fft3dlib.o
# you may also try to use the fftw wrapper to mkl (but the path might vary a lot)
# it seems this is best for AMD based systems
FFT3D   = fftmpiw.o fftmpi_map.o  fftw3d.o  fft3dlib.o   $(MKL_FFTW_PATH)/libfftw3xf_intel.a
INCS = -I$(MKLROOT)/include/fftw
----------
------------------------------------------------------------------------------
■ vasp.5.3 (IntelMPI)
1. tar zxvf vasp.5.3.3.tar.gz
2. cd vasp.5.3
3. cp makefile.linux_ifc_P4 makefile
4. gedit makefile
  -----
  FC=ifort
  FCL=$(FC)
  CPP_ =  ./preprocess <$*.F | /usr/bin/cpp -P -C -traditional >$*$(SUFFIX)
  CPP_=fpp -f_com=no -free -w0 $*.F $*$(SUFFIX)
  CPP     = $(CPP_)  -DHOST=\"LinuxIFC\" \
          -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc -DNGXhalf \
  FFLAGS =  -FR -names lowercase -assume byterecl
  OFLAG=-O2 -ip -axAVX2,AVX,SSE4.2,SSE4.1,SSE3,SSSE3,SSE2
  OFLAG_HIGH = $(OFLAG)
  OBJ_HIGH =
  OBJ_NOOPT =
  DEBUG  = -FR -O0
  INLINE = $(OFLAG)
  MKL_PATH=$(MKLROOT)/lib/intel64
  MKL_FFTW_PATH=$(MKLROOT)/interfaces/fftw3xf/
  BLAS=
  LAPACK=
  LIB  = -L../vasp.5.lib -ldmy \
     ../vasp.5.lib/linpack_double.o $(LAPACK) \
     $(BLAS)
  FFT3D   = fft3dfurth.o fft3dlib.o
  FC=mpiifort
  FCL=$(FC) -mkl
  CPP    = $(CPP_) -DMPI  -DHOST=\"LinuxIFC\" -DIFC \
     -DCACHE_SIZE=4000 -DPGF90 -Davoidalloc -DNGZhalf \
     -DMPI_BLOCK=8000 -Duse_collective -DscaLAPACK -Duse_collective \
     -DnoAugXCmeta -Duse_bse_te \
     -Duse_shmem -Dtbdyn
  BLACS= -lmkl_blacs_intelmpi_lp64
  SCA= $(MKL_PATH)/libmkl_scalapack_lp64.a $(BLACS)
  LIB     = -L../vasp.5.lib -ldmy  \
      ../vasp.5.lib/linpack_double.o \
      $(SCA) $(LAPACK) $(BLAS)
  FFT3D   = fftmpiw.o fftmpi_map.o  fftw3d.o  fft3dlib.o   $(MKL_FFTW_PATH)/libfftw3xf_intel.a
  INCS = -I$(MKLROOT)/include/fftw
  -----
5. make
Retry case: gedit makefile > make clean > make
------------------------------------------------------------------------------
■ recompile
Phonon calculation error case
---------
    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 *.f90
 You get "subrot_cluster.f90:    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.tgz
------------------------------------------------------------------------------
■ Phonopy
1) download phonopy: http://atztogo.github.io/phonopy/
to http://atztogo.github.io/phonopy/inst...
2) download phonopy-1.11.2.25.tar.gz
3) tar zxvf phonopy-1.11.2.25.tar.gz
4) cd phonopy*
5) sudo python setup.py install
------------------------------------------------------------------------------
■ Phono3py
1) download phono3py: http://atztogo.github.io/phono3py/
to http://atztogo.github.io/phono3py/ins...
2) tar zxvf phono3py-1.11.3.29.tar.gz
3) cd phono3py*
4) sudo python setup.py install
------------------------------------------------------------------------------
■ intelmpi environmental settings (skip this procedure for OpenMPI)
# ssh
1. sudo apt-get install openssh-server
2. sudo apt-get install ssh
3. mkdir .ssh
4. ssh-keygen
  All enter
5. cd .ssh
6. cat id_rsa.pub > authorized_keys
7. sudo gedit /etc/ssh/sshd_config
8. service ssh restart

# MPD
1. gedit $HOME/.mpd.conf
  secretword=<mpd secret word>
2. chmod 600 $HOME/.mpd.conf
3. gedit $HOME/mpd.hosts
  127.0.0.1
4. gedit $HOME/machinefile
  127.0.0.1:4
5. mpdallexit
6. mpdboot -f $HOME/mpd.hosts -n 4 -r ssh
7. mpdtrace
8. mpiexec -machinefile $HOME/machinefile -n 2 python -V

# Usage
mpiexec -machinefile $HOME/machinefile -env I_MPI_DEVICE sock -n 4 /home/student/vasp/vasp.5.3/vasp -r ssh
mpirun -machinefile $HOME/machinefile -env I_MPI_DEVICE sock -np 4 /home/student/vasp/vasp.5.3/vasp -r ssh
mpirun -machinefile $HOME/machinefile -genv I_MPI_DEVICE sock -n 4 /home/student/vasp/vasp.5.3/vasp -r ssh
------------------------------------------------------------------------------
■ hyperthreading OFF
[1] https://monostudio.jp/1178
------------------------------------------------------------------------------
■ Abinit

◇ intel MPI + intel compiler + MKL + intel FFT
1. tar zxvf $HOME/Downloads/abinit-7.10.5.tar.gz
2. cd abinit-7.10.5
3. ./configure FC=mpiifort CC=mpiicc CXX=mpiicpc --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" --with-fft-flavor=fftw3-mkl --with-fft-libs="-L/opt/intel/compilers_and_libraries/linux/mkl/interfaces/fftw3xf -lfftw3xf_intel" --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. cd tests
6. mpirun -machinefile $HOME/machinefile -env I_MPI_DEVICE sock -r ssh ./runtests.py -j4 fast
7. cd ..
8. sudo make install

◇ Usage
mpirun -machinefile $HOME/machinefile -env I_MPI_DEVICE sock -r ssh -np 4 abinit < case.in > case.out
------------------------------------------------------------------------------
■ PWscf

◇ intel MPI + intel compiler + MKL + intel FFT
1. tar zxvf $HOME/Downloads/qe-6.0.tar.gz
2. cd qe-6.0
3. ./configure MPIF90=mpiifort CXX=g++ CC=gcc FC=ifort F77=ifort F90=ifort 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" FFT_LIBS="${MKLROOT}/interfaces/fftw3xf/libfftw3xf_intel.a" --enable-openmp
4. make all

◇ Usage
mpirun -machinefile $HOME/machinefile -env I_MPI_DEVICE sock -r ssh -np 4 $HOME/qe-6.0/bin/pw.x < case.in > case.out
-----------------------------------------------------------------------------
OpenMPI (skip this procedure for intelmpi, home case)
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
#--------------------
-----------------------------------------------------------------------------
■ LIBXC
□ download (Libxc:download - OctopusWiki - TDDFT.org)
http://www.tddft.org/programs/octopus...

□ install autoconf and libtool
sudo apt-get install autoconf
sudo apt-get install libtool

□ install libxc
tar zxvf $HOME/Downloads/libxc*
cd libxc*
autoreconf -i
./configure FC=ifort CC=icc F77=ifort
make
make check
(make check | tee results)
sudo make install

□ Libraries have been installed in: /opt/etsf/lib
/opt/etsf/lib/libxc.a
/opt/etsf/lib/libxcf90.a

I used openmpi-2.0.2
My PC: Intel(R) Xeon(R)  E5-2640 v3 (can use SSE4.1/4.2, AVX 2.0), see cpuinfo and web
-----------------------------------------------------------------------------
■ FFTW3 (FFTW3 for WIEN2k)
1) tar zxvf $HOME/Downloads/fftw-3.3.6-pl2.tar.gz
2) cd ff*
3) ./configure MPICC=mpiicc CC=icc F77=ifort --enable-avx2 --enable-mpi --enable-openmp --enable-threads
4) make
5) sudo make install
My PC: Intel(R) Xeon(R)  E5-2640 v3 (can use SSE4.1/4.2, AVX 2.0), see cpuinfo and web
------------------------------------------------------------------------------
■ 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
 F   FFTW options:            -DFFTW3 -I/usr/local/include
 X   LIBX options:            -DLIBXC -I/opt/etsf/include
 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:               -lfftw3_mpi -lfftw3 -L/usr/local/lib
 XL  LIBXC_LIBS:              -L/opt/etsf/lib -lxcf03 -lxc
 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) y
     Recommended setting for parallel f90 compiler: mpif90
     Current selection:  mpif90
     Your compiler: mpif90
 Do you want to automatically search for FFTW installations? (Y,n):
n
Your present FFTW choice is: FFTW3
Please specify whether you want to use FFTW3 (default) or FFTW2  (FFTW3 / FFTW2): FFTW3
Present FFTWpath is: f
Present FFTWpath is: f
Please specify the ROOT-path of your FFTW installation (like /opt/fftw3/) or accept present choice (enter):
/usr/local
Your FFTW_LIBS are: -lfftw3_mpi -lfftw3 -L/usr/local/lib
Your FFTW_OPT are : -DFFTW3 -I/usr/local/include
Is this correct? enter Y (default) or n: y
 Do you want to use ELPA? (y,N):
N
   Recommended options for system linuxifc are:

         RP_LIB(SCALAPACK+PBLAS): -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 $(R_LIBS)
         FPOPT(par.comp.options): -O1 -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML -traceback -assume buffered_io -I$(MKLROOT)/include
         MPIRUN command         : mpirun -np _NP_ -machinefile _HOSTS_ _EXEC_
   Current settings:
         FFTW_LIB + FFTW_OPT    : -lfftw3_mpi -lfftw3 -L/usr/local/lib  +  -DFFTW3 -I/usr/local/include (already set)
         ELPA_LIB + ELPA_OPT    :   +   (already set)
     RP  RP_LIB(SCALAPACK+PBLAS): -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 $(R_LIBS)
     FP  FPOPT(par.comp.options): -O1 -FR -mp1 -w -prec_div -pc80 -pad -ip -DINTEL_VML -traceback -assume buffered_io -I$(MKLROOT)/include -axAVX2
     MP  MPIRUN command         : mpirun -np _NP_ -machinefile _HOSTS_ _EXEC_
     CN  CORES_PER_NODE         : 1
     S   Save and Quit
     Q   Quit abandon changes
     To change an item select option.
Selection: s
----------
13) A   Compile all programs (suggested)
  a
----------
14) ./userconfig_lapw
----------
15) .bashrc
  export OMP_NUM_THREADS=4
----------
16) bash
17) w2web
My PC: Intel(R) Xeon(R)  E5-2640 v3 (can use SSE4.1/4.2, AVX 2.0), see cpuinfo and web
------------------------------------------------------------------------------
■ VASP 5.4.1 (gfortran, OpenMPI)
1. sudo apt-get install libopenmpi-dev
2. sudo apt-get install liblapack-dev
3. sudo apt-get install libscalapack-mpi-dev
4. sudo apt-get install libfftw3-dev
5. tar zxvf vasp.5.4.1.05Feb16.tar.gz
6. 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)
7. cd vasp.5.4.1
8. patch -p0 < patch.5.4.1.14032016
    patch -p0 < patch.5.4.1.03082016
9. cp arch/makefile.include.linux_gfortran makefile.include
10. gedit makefile.include
  -----
# Precompiler options
CPP_OPTIONS= -DMPI -DHOST=\"IFC91_ompi\" -DIFC \
             -DCACHE_SIZE=4000 -Davoidalloc \
             -DMPI_BLOCK=8000 -DscaLAPACK -Duse_collective \
             -Duse_bse_te -Duse_shmem -Dtbdyn

CPP        = gcc -E -P -C $*$(FUFFIX) >$*$(SUFFIX) $(CPP_OPTIONS)

FC         = mpif90.openmpi
FCL        = mpif90.openmpi

FREE       = -ffree-form -ffree-line-length-none

FFLAGS     =
OFLAG      = -O2 -mtune=native -m64
OFLAG_IN   = $(OFLAG)
DEBUG      = -O0

LIBDIR     = /usr/lib
BLAS       = -L$(LIBDIR) -lblas
LAPACK     = -L$(LIBDIR) -llapack
BLACS      = -lblacs-openmpi -lblacsCinit-openmpi -lblacsF77init-openmpi
SCALAPACK  = -L$(LIBDIR) -lscalapack-openmpi $(BLACS)

OBJECTS    = fftmpiw.o fftmpi_map.o  fftw3d.o  fft3dlib.o \
             /usr/lib/libfftw3.a
INCS       =-I/usr/include -I/usr/lib/openmpi/include

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

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

# For what used to be vasp.5.lib
CPP_LIB    = $(CPP)
FC_LIB     = $(FC)
CC_LIB     = gcc
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
  -----
11. make all

□ Usage
/usr/bin/mpirun.openmpi -np 4 $HOME/vasp/vasp.5.4.1/bin/vasp_std
------------------------------------------------------------------------------
■ vasp.5.4 (intel fortran, OpenMPI, gcc libfftw3xf_gnu.a)
1. tar zxvf vasp.5.4.1.05Feb16.tar.gz
2. 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)
3. cd vasp.5.4.1
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
  -----
# Precompiler options
CPP_OPTIONS= -DMPI -DHOST=\"IFC91_ompi\" -DIFC \
             -DCACHE_SIZE=4000 -DPGF90 -Davoidalloc \
             -DMPI_BLOCK=8000 -DscaLAPACK -Duse_collective \
             -Duse_bse_te -Duse_shmem -Dtbdyn

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

FC         = mpif90
FCL        = mpif90 -mkl=sequential

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_gnu.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     = gcc
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
/usr/bin/mpirun.openmpi -np 4 $HOME/vasp/vasp.5.4.1/bin/vasp_std
------------------------------------------------------------------------------
■ vasp.5.4 (intel compiler, OpenMPI, icc libfftw3xf_intel.a)
1. tar zxvf vasp.5.4.1.05Feb16.tar.gz
2. 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)
3. cd vasp.5.4.1
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
  -----
# 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
/usr/bin/mpirun.openmpi -np 4 $HOME/vasp/vasp.5.4.1/bin/vasp_std
------------------------------------------------------------------------------
アクセス数
ページビュー数