top of page

IIntel® Xeon® Processor E3-1230 (8M Cache, 3.20 GHz) (turbo 3.6GHz) Octa-thread core

16GB (8GB X 2) DDR3 | 2133MHz Dual Channel memory (turbo)

GeForce GTX 760 TI 2GB DDR5 16X3.0 PCIe card

2 Hard Drives (1TB and 1TB)

Written by Lee,BooYoun

 

Setting up and testing Quantum Espresso in Ubuntu 14.04

 

Quantum Espresso: (www.quantum-espresso.org) is a great open source free package to perform DFT calculation. I do Ab-initio calculations of some of the materials that we study to compare them with our experimental data. 

 

I set up a workstation to run QE, so I figured I would share the compiling process in case anyone finds him/herself trying to do the same.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The first step is getting Ubuntu or install Ubuntu on a virtual machine in your computer. Ubuntu is a GUI based program 

To compile Quantum Espresso we will need a few things:

  1.Working C, C++ and FORTRAN compilers. (GFortran solves the compatibility issues when you want to put some additional libraries for experimental issues!!!)

  2.BLAS and LAPACK (Intel MKL library coming with Parallel studio will be enough)

  3.MPI implementation (to take advantage of the Octa core and run the process in parallel).

  4. FFTW3

 

A. Working compilers: I used the Intel compilers (can be found at https://software.intel.com/en-us/intel-compilers). You can download the compiler suites and use them for free if you’re going to do academic work (not sure about the restrictions, so you should read the conditions).

 

   These compilers are very easy to install. Make sure to pick the right package for your processor, in    

   my case it was intel64. It might give you warnings about need for extra packages to run ia32 code,   

   but I disregarded these and I had no problems.

 

<prerequisites could be 

sudo –s

apt-get update

apt-get install build-essential

apt-get install gcc-multilib

apt-get install rmp

apt-get install openjdk-6-jre-headless>

 

B. BLAS and LAPACK: I found out that the Intel Composer that you used to install the compilers, also installs the Intel MKL (Math Kernel Library) core. So you don’t have to worry about that.

At this point, you want to make sure that the libraries and compilers that you just installed are accessible and can be used for future compilation. This means, that you have to include these libraries in the LIBRARY_LD variable, as well as include the location of the compliers in the PATH variable.  Intel includes shell scripts that do this for you within the installation directory. In my case, I chose the predetermined directory /opt/intel. So just locate the shell scripts and add something like this to your

.bashrc file: <source /opt/intel/mkl/bin/mklvars.sh intel64>

 

The intel64 part at the end is necessary, since you have to specify the architecture.

 

C. MPI implementation: For this one, I chose to build openmpi 1.8.1 with the Intel compilers. It is free as well and you can get it from: http://www.open-mpi.org/. Be careful to choose the appropiate flags for the compilers when running the ./configure.

It is recommended to install MPI manally then just apt-get. Because you could later be in need of using other MPI environment.

 

./configure --prefix=/usr/local/openmpi

make

make install

 

Add the following environment variable to your ~/.bashrc (if you are using bash) or ~/.tcshrc (if you are using tcsh), where /usr/local is the installation directory: <gedit ~/.bashrc>

 

export MPI_DIR=/usr/local/openmpi

export PATH=/usr/local/openmpi/bin:$PATH

export LD_LIBRARY_PATH=/usr/local/openmpi/lib:$LD_LIBRARY_PATH

 

D. FFTW3: You can download it from www.fftw.org and build it yourself, or you can get lazy (as I did) and just install it the usual way: sudo apt-get install libfftw3-dev libfftw3-doc

   For parallel version installation or manual install, try the following

 

./configure --prefix=/usr/local/fftw --enable-mpi

make

make install

 

Add the following environment variable to your ~/.bashrc (if you are using bash) or ~/.tcshrc (if you are using tcsh), where /usr/local is the installation directory: <gedit ~/.bashrc>

 

export LD_LIBRARY_PATH=/usr/local/fftw/lib:$LD_LIBRARY_PATH

 

E. Quantum Espresso: Ok, so we’re almost ready to compile QE. As with the Intel libraries and compilers, make sure that the openmpi libraries and compilers can be found by QE. In my case, I used gfortran, openmpi, fftw. (if you put source /opt/intel/bin/compilervars.sh intel64, (intel fortran compiler) compatibility issues might sprung up sometimes.)

 

After this, you should be all set to compile QE! I compiled the 5.2.0 version, and it should automatically find the MKL libraries, and also the parallel compilers (mpif90).

Warning! Apparently the Intel composer includes a “crippled” version of MPI. So even if you include this in the .bashrc, if you source the compilervars.sh file from Intel, it will look for the mpirun in the Intel directory which is not useful. So you will have to edit a file called “compilervars_arch.sh” and comment out the MPI part. 

As a simple benchmark, I used the example11 included with this distribution of QE.

 

./configure has many possible options. You could <gedit make.sys> to see compilation is complete.

Then you could type in <make pw> (making executables). <make all> (making all components).

When it shows no error messages, then you could check if it works fine or not.

In my case, i installed it on opt directory. So it should be:

 

cd /opt/espresso-5.2.0/PW/tests

./check.pw-x-j (It will calculate many times. Internet connection would enable executable to download potential files from Quantum server.)

 

cd /opt/espresso-5.2.0/PW/examples

./run_all_examples (It will show how quantum do the works. In the results folder, you could observe how the scripts file are doing the job.)

 

 

Quantum Materials for Energy Conversion Lab
School of Energy and Chemical Engineering, Ulsan National Institute of Science and Technology

반도체 ALD 박막 증착, DRAM 및 NAND 소자 제작,

DFT 시뮬레이션 관심 있는 대학원생 모집합니다

Contact : junhee@unist.ac.kr

Catalyst

Battery

Semiconductor

Hydrogen production

bottom of page