Install Yambo on Ubuntu/LinuxMint: Difference between revisions
m (Removed patch level) |
No edit summary |
||
(19 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Here we can find the instruction to install Yambo 5. | Here we can find the instruction to install Yambo 5.3 on a standard machine with a [https://ubuntu.com/ Ubuntu]/[https://linuxmint.com/ LinuxMint] distribution. | ||
We suppose you have root permission on your machine to install all the required packages. In this installation we will use MKL libraries, <br> | |||
if you have an AMD processor you could be interested to use the AOLC(AMD Optimizing CPU Libraries) libraries: [https://www.amd.com/fr/developer/aocl.html https://www.amd.com/fr/developer/aocl.html] | |||
Run apt-get to update the package list | Run apt-get to update the package list | ||
Line 7: | Line 9: | ||
apt-get -yqq update | apt-get -yqq update | ||
Install compilers | Install compilers, and all necessary libraries to compile Yambo: | ||
apt-get install build-essential | '''<span style="color:#0000FF">sudo apt-get install</span> build-essential make gcc g++ gfortran openmpi-bin openmpi-common libopenmpi-dev intel-mkl libxc9 libxc-dev intel-mkl libscalapack-openmpi-dev libhdf5-dev libhdf5-openmpi-dev slepc-dev petsc-dev libmkl-blacs-openmpi-lp64 libmkl-scalapack-lp64''' | ||
'''<span style="color:#0000FF">export</span> LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/"''' | |||
'''<span style="color:#0000FF">export</span> MKLROOT="/usr/"''' | |||
download lastest Yambo release, in this case the 5. | download lastest Yambo release, in this case the 5.3: | ||
wget https://github.com/yambo-code/yambo/archive/5. | wget https://github.com/yambo-code/yambo/archive/5.3.tar.gz -O yambo-5.3.tar.gz | ||
decompress the file | decompress the file | ||
tar zxfv yambo-5. | tar zxfv yambo-5.3.tar.gz && cd yambo-5.3 | ||
configure Yambo | configure Yambo | ||
./configure | '''<span style="color:#0000FF">./configure</span> --enable-open-mp --enable-par-linalg --enable-memory-profile --with-scalapack-libs="-lmkl_scalapack_lp64" --with-blacs-libs="-lmkl_blacs_openmpi_lp64" --enable-slepc-linalg --with-slepc-libs="-lslepc" --with-slepc-includedir=/usr/include/slepc/ --with-petsc-libs="-lpetsc" --with-petsc-includedir=/usr/include/petsc/ --with-libxc-libdir=/usr/lib/x86_64-linux-gnu/ --with-libxc-includedir=/usr/include/''' | ||
compile the code | compile the code: | ||
make -j4 core | '''make -j4 core''' | ||
where -j4 means that the code is compiled in parallel on 4 cores | |||
The compilation was successful if there are the yambo executables in the <code>bin/</code> directory. | The compilation was successful if there are the yambo executables in the <code>bin/</code> directory. | ||
Line 42: | Line 39: | ||
Create a folder to install code and libraries: | Create a folder to install code and libraries: | ||
mkdir -p /usr/local/yambo-5. | mkdir -p /usr/local/yambo-5.3/lib | ||
copy code and libraries in Yambo folder: | copy code and libraries in Yambo folder: | ||
cp -r bin / | cp -r bin /home/username/local/yambo-5.3/ | ||
cp -r lib/external/*/*/lib/*.* / | cp -r lib/external/*/*/lib/*.* /home/username/local/yambo-5.3/lib/ | ||
cp -r lib/external/*/*/v4/serial/lib/*.* / | cp -r lib/external/*/*/v4/serial/lib/*.* /home/username/local/yambo-5.3/lib/ | ||
cp -r lib/external/*/*/include/*.* /home/username/local/yambo-5.3/include/ | |||
cp -r lib/external/*/*/v4/serial/include/*.* /home/username/local/yambo-5.3/include/ | |||
you can remove the tar.gz file and the Yambo folder (optional): | you can remove the tar.gz file and the Yambo folder (optional): | ||
cp .. | cp .. | ||
rm -rf yambo-5. | rm -rf yambo-5.3 yambo-5.3.tar.gz | ||
set the path to the Yambo bin folder, for tcsh/csh: | set the path to the Yambo bin folder, for tcsh/csh: | ||
setenv PATH=/ | setenv PATH=/home/username/local/yambo-5.3/bin:$PATH | ||
setenv LD_LIBRARY_PATH=/ | setenv LD_LIBRARY_PATH=/home/username/local/yambo-5.3/lib:$LD_LIBRARY_PATH | ||
or in bash: | or in bash: | ||
export PATH=/usr/local/yambo-5. | export PATH=/usr/local/yambo-5.3/bin:$PATH | ||
export LD_LIBRARY_PATH=/usr/local/yambo-5. | export LD_LIBRARY_PATH=/usr/local/yambo-5.3/lib:$LD_LIBRARY_PATH | ||
you are ready to use Yambo!!!! | you are ready to use Yambo!!!! | ||
Line 72: | Line 71: | ||
you can copy also the include files: | you can copy also the include files: | ||
mkdir -p /usr/local/yambo-5. | mkdir -p /usr/local/yambo-5.3/include | ||
cp -r lib/external/*/*/include/*.* /usr/local/yambo-5. | cp -r lib/external/*/*/include/*.* /usr/local/yambo-5.3/include/ | ||
cp -r lib/external/*/*/v4/serial/include/*.* /usr/local/yambo-5. | cp -r lib/external/*/*/v4/serial/include/*.* /usr/local/yambo-5.3/include/ | ||
and can add to the configure the following lines: | and can add to the configure the following lines: | ||
export YAMBO_LIBS=/usr/local/yambo-5. | export YAMBO_LIBS=/usr/local/yambo-5.3 | ||
and use the following options in the configure: | and use the following options in the configure: | ||
--with-iotk-path="${YAMBO_LIBS}" | --with-iotk-path="${YAMBO_LIBS}" --with-netcdf-path="${YAMBO_LIBS}" --with-netcdff-path="${YAMBO_LIBS}" | ||
so the next time you recompile yambo from scrach it will not recompile the libraries. | so the next time you recompile yambo from scrach it will not recompile the libraries. |
Latest revision as of 09:03, 14 February 2025
Here we can find the instruction to install Yambo 5.3 on a standard machine with a Ubuntu/LinuxMint distribution.
We suppose you have root permission on your machine to install all the required packages. In this installation we will use MKL libraries,
if you have an AMD processor you could be interested to use the AOLC(AMD Optimizing CPU Libraries) libraries: https://www.amd.com/fr/developer/aocl.html
Run apt-get to update the package list
apt-get -yqq update
Install compilers, and all necessary libraries to compile Yambo:
sudo apt-get install build-essential make gcc g++ gfortran openmpi-bin openmpi-common libopenmpi-dev intel-mkl libxc9 libxc-dev intel-mkl libscalapack-openmpi-dev libhdf5-dev libhdf5-openmpi-dev slepc-dev petsc-dev libmkl-blacs-openmpi-lp64 libmkl-scalapack-lp64
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/" export MKLROOT="/usr/"
download lastest Yambo release, in this case the 5.3:
wget https://github.com/yambo-code/yambo/archive/5.3.tar.gz -O yambo-5.3.tar.gz
decompress the file
tar zxfv yambo-5.3.tar.gz && cd yambo-5.3
configure Yambo
./configure --enable-open-mp --enable-par-linalg --enable-memory-profile --with-scalapack-libs="-lmkl_scalapack_lp64" --with-blacs-libs="-lmkl_blacs_openmpi_lp64" --enable-slepc-linalg --with-slepc-libs="-lslepc" --with-slepc-includedir=/usr/include/slepc/ --with-petsc-libs="-lpetsc" --with-petsc-includedir=/usr/include/petsc/ --with-libxc-libdir=/usr/lib/x86_64-linux-gnu/ --with-libxc-includedir=/usr/include/
compile the code:
make -j4 core
where -j4 means that the code is compiled in parallel on 4 cores
The compilation was successful if there are the yambo executables in the bin/
directory.
From now the instructions are optional but suggested! You may need sudo privileges to install Yambo in a system directory, otherwise install it in your home space.
Create a folder to install code and libraries:
mkdir -p /usr/local/yambo-5.3/lib
copy code and libraries in Yambo folder:
cp -r bin /home/username/local/yambo-5.3/ cp -r lib/external/*/*/lib/*.* /home/username/local/yambo-5.3/lib/ cp -r lib/external/*/*/v4/serial/lib/*.* /home/username/local/yambo-5.3/lib/ cp -r lib/external/*/*/include/*.* /home/username/local/yambo-5.3/include/ cp -r lib/external/*/*/v4/serial/include/*.* /home/username/local/yambo-5.3/include/
you can remove the tar.gz file and the Yambo folder (optional):
cp .. rm -rf yambo-5.3 yambo-5.3.tar.gz
set the path to the Yambo bin folder, for tcsh/csh:
setenv PATH=/home/username/local/yambo-5.3/bin:$PATH setenv LD_LIBRARY_PATH=/home/username/local/yambo-5.3/lib:$LD_LIBRARY_PATH
or in bash:
export PATH=/usr/local/yambo-5.3/bin:$PATH export LD_LIBRARY_PATH=/usr/local/yambo-5.3/lib:$LD_LIBRARY_PATH
you are ready to use Yambo!!!!
Optional for developers
you can copy also the include files:
mkdir -p /usr/local/yambo-5.3/include cp -r lib/external/*/*/include/*.* /usr/local/yambo-5.3/include/ cp -r lib/external/*/*/v4/serial/include/*.* /usr/local/yambo-5.3/include/
and can add to the configure the following lines:
export YAMBO_LIBS=/usr/local/yambo-5.3
and use the following options in the configure:
--with-iotk-path="${YAMBO_LIBS}" --with-netcdf-path="${YAMBO_LIBS}" --with-netcdff-path="${YAMBO_LIBS}"
so the next time you recompile yambo from scrach it will not recompile the libraries.