Install Yambo on Ubuntu/LinuxMint

From The Yambo Project
Revision as of 19:24, 2 April 2021 by Attacc (talk | contribs)
Jump to navigation Jump to search

Here we can find the instruction to install Yambo 5.0.1 on a standard machine with a Ubuntu/LinuxMint distribution.

We suppose you have root permission on your machine to install all the required packages.

Run apt-get to update the package list

apt-get -yqq update 

Install compilers, python, mkl, and all necessary libraries to compile Yambo:

apt-get -yqq install --no-install-recommends build-essential ca-certificates curl file \
       make gcc g++ gfortran git gnupg2 iproute2 lmod \
       locales lua-posix python3 python3-pip python3-setuptools \
       tcl unzip m4 wget git zlib1g-dev ssh \
       libmkl-gf-lp64 libmkl-gnu-thread libmkl-avx libmkl-avx2 libmkl-avx512 libmkl-core libmkl-def libmkl-dev libmkl-gf-ilp64 

remove downloaded packages and set language:

apt-get clean 
locale-gen en_US.UTF-8 

download lastest Yambo release, this case the 5.0.1:

wget https://github.com/yambo-code/yambo/archive/5.0.1.tar.gz -O yambo-5.0.1.tar.gz 

decompress the file

tar zxfv yambo-5.0.1.tar.gz && cd yambo-5.0.1 

configure Yambo

./configure --disable-mpi --enable-open-mp --enable-msgs-comps --enable-time-profile --enable-memory-profile \
 --with-blas-libs="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl" \
 --with-lapack-libs="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl" 

compile the code

 make -j4 yambo && make -j4 interfaces && make -j4 ypp 

create a folder to install code and libraries:

mkdir -p /usr/local/yambo-5.0.1/lib 

copy code and libraries in Yambo folder:

cp -r bin /usr/local/yambo-5.0.1/ 
cp -r lib/external/*/*/lib/*.* /usr/local/yambo-5.0.1/lib/ 
cp -r lib/external/*/*/v4/serial/lib/*.* /usr/local/yambo-5.0.1/lib/ 
cd .. 

you can remove the tar.gz file and the Yambo folder:

 rm -rf yambo-5.0.1 yambo-5.0.1.tar.gz

set the path to the Yambo bin folder, for tcsh/csh:

setenv PATH=/usr/local/yambo-5.0.1/bin:$PATH 
setenv LD_LIBRARY_PATH=/usr/local/yambo-5.0.1/lib:$LD_LIBRARY_PATH

or in bash:

export PATH=/usr/local/yambo-5.0.1/bin:$PATH 
export LD_LIBRARY_PATH=/usr/local/yambo-5.0.1/lib:$LD_LIBRARY_PATH

you are ready to use Yambo!!!!