Installation: Difference between revisions

From The Yambo Project
Jump to navigation Jump to search
No edit summary
 
(58 intermediate revisions by 8 users not shown)
Line 1: Line 1:
=== Preinstall ===
=== Download ===


Download the yambo source as explained in [[Getting Yambo]].  
The Yambo source code can be downloaded from several sources. Refer to the [[Download|dedicated page]] for further informations.


Yambo can make good use of external libraries like FFTW, ESSL, BLAS, netCDF, and so on. It is worth identifying if they are already installed on your system, especially for HPCs.
=== Quick Configuration (with long compilation) ===


=== Quick install ===
Yambo can make good use of external libraries like FFTW, LAPACK, netCDF, HDF5, IOTK, LIBXC and so on. It is worth identifying if they are already installed on your system, especially for HPC machines.


If you are lucky, the configure script will successfully find the best compiler options.
If you are lucky, the configure script will successfully find the best compiler options. Moving in the source directory you can configure quickly Yambo and start the compilation simply with these two commands:
$ ./configure
$ make core


% tar -xvzf yambo-latest.tar.gz
This leads to a very long compilation because Yambo will download and compile all the required libraries. Executables are found in the <tt>bin</tt> folder. To check that it works:
% cd yambo-X.X.X
% ./configure
% make yambo ypp interfaces


Executables are found in the <tt>bin</tt> folder. To check that it works:


  % ./bin/yambo
The simplest install of yambo is the one using internal libraries and compiled with gfortran. This is useful to test the code on your local machine, or in order to easily follow the [[Tutorials|yambo tutorials]].
  $ ./bin/yambo
   
   
  Cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)
  Cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)


=== Full install ===
This is the expected error message since we didn't provide the input database needed by Yambo.


In general, however, some fine-tuning will be necessary to link the requested libraries.
=== Custom Configuration ===


./configure --help
In general, however, some fine-tuning will be necessary to link the requested libraries.  
It is also possible to customize the configurazion using configure options that allow you to enable or disable some features. In order to have a complete list of all those options use the command


for a large set of options.  
$./configure --help


Insert details here...
After configure, you can also edit the <code>config/setup</code> file. You can run the following configure script (named for example <code>yambo_install.sh</code>) which should work for '''yambo 5.0''' on '''Linux machines''':
YAMBO_EXT_LIBS="/user/defined/path/for/internal/libs"
./configure FC=gfortran \
  --with-extlibs-path=$YAMBO_EXT_LIBS \
  --enable-keep-extlibs \
  --enable-time-profile \
  --enable-msgs-comps \
  --enable-keep-src \
  --enable-memory-profile \
  --enable-int-linalg \
  --enable-par-linalg \
  --enable-netcdf-output \
  --enable-slepc-linalg


After configure, you can also edit the <code>config/setup</code> file.
==== Specific Configuration options ====


=== See also ===
Here some info about the different configuration options:
* [[configure-suggested|Details on configure options for yambo]]


* [[Configure options for Yambo v3 and earlier]]
Here is a list of specific configuration options.
* [[configure options for Yambo v4]]
* [[configure-5.0|Configure options for yambo 5.0]]  
* [[Machine specific configure scripts]]
* [[configure-4.4.0|Configure options for Yambo 4.4]]
* [[configure options for Yambo v4|Configure options for Yambo v4 and v3]]


=== Linking to external libraries ===
=== Further informations ===


==== NetCDF support ====
* [[Install Yambo on Ubuntu/LinuxMint]] (2021, Yambo 5.1)
 
* [[Install Yambo on Ubuntu/LinuxMint with Intel compiler]] (2021, Yambo 5.1)
One of the most useful features of yambo is its ability to carry out all (or most of!) the database I/O using the NetCDF libraries. If NetCDF support is not possible, yambo will handle the database I/O using the native binary Fortran format. Many high-performance architectures already have the NetCDF libraries available, so make sure to check these out first. If not, you will have to download and compile the libraries from the link above. You might find it useful to consult the successful build outputs. Once NetCDF is compiled and installed on your system, you can use the configure script to compile yambo with NetCDF support using
* [[Install Yambo on Ubuntu/LinuxMint with NVfortran compiler]] (2024, Yambo 5.2)
 
* [[Install Yambo in IRENE machine (TGCC Joliot Curie)]]
./configure --with-netcdf-lib=<NetCDF LIB DIRECTORY> --with-netcdf-include=<NetCDF INCLUDE DIRECTORY>
* [[Compile the libraries in Yambo independently]]
 
* [[Install Yambo with external HDF5 and NetCDF libraries]]
==== NetCDF as underlying storage layer of HDF5 ====
* [[Static Yambo]]
 
* [[Machine specific configure scripts]]
It is possible to configure NetCDF 4.x.x as underlying storage layer of the HDF5 library. Compile Yambo with NetCDF as described in the previous section and add the flag --enable-netcdf-hdf5. Notice that when NetCDF library is compiled with the HDF5 support it requires additional libraries in the linking process, see here for more details. Yambo automatically detects these libraries but if it doesn't work you can use the flag --with-netcdf-link=... to pass you own libraries list.
* [[Compiler specific flags]]
FFTW support


The configure script should hopefully detect FFTW libraries if they are located in your $PATH. Otherwise, you can specify user-defined locations with
=== Known Issues ===
* '''[https://gcc.gnu.org/wiki/GFortran gfortran] 4.4 or earlier versions'''<br>Yambo 5.x uses different Fortran constructs, as for example "allocate(x, source=y)", that are not supported by gfortran 4.4 and its earlier versions, please update your gfortran or use a different compiler.


./configure --with-fftw=<FFTW LIB DIRECTORY>
* '''NetCDF/HDF5 in Ubuntu 20.4'''<br>Internal NetCDF and HDF5 libraries in LinuxMint 20.1/Ubuntu 20.4 have problems with Yambo  please use internal Yambo libraries
If you are running on the CINECA CRAY systems, the FFTW library is located in /cineca/prod/lib. Hence, try compiling with:
./configure --with-fftw=/cineca/prod/lib
Of course, if the linking with FFTW doesn't work, the default Goedecker FFT routines will be used.
==== IOTK support ====


To import output from PWscf/Quantum-Espresso, the IOTK libraries (Input/Output ToolKit, bundled with the QE distribution) need to be linked. Provide the path to the IOTK directory in the compiled PWscf source, and specify the version of PWscf, e.g.:
* '''Quantum-Espresso at GAMMA point'''<br>  In Quantum-Espresso if you perform a SCF calculation using the option "KPOINTS gamma"  you should use the same option for the NSCF otherwise Yambo gets confused with the g-vectors. If you need more k-points in the NSCF just re-run the SCF with "KPOINTS automatic /1 1 1 0 0 0"    and the run NSCF with a finite k-grid


./configure --with-iotk='/usr/local/src/espresso-4.0/iotk' --with-p2y=4.0
* '''Internal MAC-OSX libraries'''<br>  At present it is no possible to compile Yambo with internal macos libraries  Indeed, no include/system/netcdf.mod file is present in the system.   The problem is due to Autoconf setting which automatically searches for versions    of the needed libraries in your system despite the specific options given to configure.   Then, it would compile the internal hdf5, then find an external netcdf,    then try to compile netcdf-fortran creating various conflicts.
On some HPC systems you might have to compile PWscf yourself to make the IOTK libraries available.
==== ETSF-IO support ====


To import output from Abinit, you can compile abinit with the option --with-trio-flavor="none" and then compile the yambo interfaces with no additional options.
* '''gfortran compiler on MAC-OSX'''<br> There are different problems compiling Yambo with "gfortran"  variant of the compiler/libraries with MacPorts,    a possible solution it is to install the "gcc8" variant of these libraries and compilters. <br>More details here: [http://www.yambo-code.eu/forum/viewtopic.php?t=1767 http://www.yambo-code.eu/forum/viewtopic.php?t=1767]


However from yambo 3.4.1 we suggest to use the ETSF-IO support. Try to compile abinit with the netcdf+etsf_io IO/flavor. If you are in the $ABINIT_SOURCE_PATH directory, you may try something like that:
* '''Input file generation on MacOSX'''<br> There are two issues on input file generation: 1) when you generate an input file on MacOSX Yambo is not able to read values already present in the input file, and reset them to the default value; 2) if yambo and ypp have the same option to generate an input file the code get confused. Please use long input strings, for example "yambo -optics" instead of "yambo -o".


mkdir compile_tmp
* '''Parallel compilation with nvfortran for nproc >=8 ''' <br> Compiling yambo in parallel with nvfortran and 8 or more processor give some problem. Please compile with less processors
cd compile_tmp
../configure --with-trio-flavor="netcdf+etsf_io" --with-dft-flavor="libxc" --with-netcdf-incs="-I/usr/include/"
  --with-netcdf-libs="-L/usr/lib/ -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lcurl -lz"
  MPI_RUNNER="mpirun"  CC="mpicc" FC="mpif90" --prefix="$ABINIT_INSTALL_PATH" --exec-prefix="$ABINIT_INSTALL_PATH"
and then compile yambo with the ETSF-IO support
./configure --with-etsf-io-lib="$ABINIT_SOURCE_PATH/compile_tmp/fallbacks/exports/lib"
            --with-etsf-io-include="$ABINIT_SOURCE_LIB/compile_tmp/fallbacks/exports/include"

Latest revision as of 17:17, 4 November 2024

Download

The Yambo source code can be downloaded from several sources. Refer to the dedicated page for further informations.

Quick Configuration (with long compilation)

Yambo can make good use of external libraries like FFTW, LAPACK, netCDF, HDF5, IOTK, LIBXC and so on. It is worth identifying if they are already installed on your system, especially for HPC machines.

If you are lucky, the configure script will successfully find the best compiler options. Moving in the source directory you can configure quickly Yambo and start the compilation simply with these two commands:

$ ./configure
$ make core

This leads to a very long compilation because Yambo will download and compile all the required libraries. Executables are found in the bin folder. To check that it works:


The simplest install of yambo is the one using internal libraries and compiled with gfortran. This is useful to test the code on your local machine, or in order to easily follow the yambo tutorials.

$ ./bin/yambo

Cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)

This is the expected error message since we didn't provide the input database needed by Yambo.

Custom Configuration

In general, however, some fine-tuning will be necessary to link the requested libraries. It is also possible to customize the configurazion using configure options that allow you to enable or disable some features. In order to have a complete list of all those options use the command

$./configure --help

After configure, you can also edit the config/setup file. You can run the following configure script (named for example yambo_install.sh) which should work for yambo 5.0 on Linux machines:

YAMBO_EXT_LIBS="/user/defined/path/for/internal/libs"
./configure FC=gfortran \
 --with-extlibs-path=$YAMBO_EXT_LIBS \
 --enable-keep-extlibs \
 --enable-time-profile \
 --enable-msgs-comps \
 --enable-keep-src \
 --enable-memory-profile \
 --enable-int-linalg \
 --enable-par-linalg \
 --enable-netcdf-output \
 --enable-slepc-linalg

Specific Configuration options

Here some info about the different configuration options:

Here is a list of specific configuration options.

Further informations

Known Issues

  • gfortran 4.4 or earlier versions
    Yambo 5.x uses different Fortran constructs, as for example "allocate(x, source=y)", that are not supported by gfortran 4.4 and its earlier versions, please update your gfortran or use a different compiler.
  • NetCDF/HDF5 in Ubuntu 20.4
    Internal NetCDF and HDF5 libraries in LinuxMint 20.1/Ubuntu 20.4 have problems with Yambo please use internal Yambo libraries
  • Quantum-Espresso at GAMMA point
    In Quantum-Espresso if you perform a SCF calculation using the option "KPOINTS gamma" you should use the same option for the NSCF otherwise Yambo gets confused with the g-vectors. If you need more k-points in the NSCF just re-run the SCF with "KPOINTS automatic /1 1 1 0 0 0" and the run NSCF with a finite k-grid
  • Internal MAC-OSX libraries
    At present it is no possible to compile Yambo with internal macos libraries Indeed, no include/system/netcdf.mod file is present in the system. The problem is due to Autoconf setting which automatically searches for versions of the needed libraries in your system despite the specific options given to configure. Then, it would compile the internal hdf5, then find an external netcdf, then try to compile netcdf-fortran creating various conflicts.
  • gfortran compiler on MAC-OSX
    There are different problems compiling Yambo with "gfortran" variant of the compiler/libraries with MacPorts, a possible solution it is to install the "gcc8" variant of these libraries and compilters.
    More details here: http://www.yambo-code.eu/forum/viewtopic.php?t=1767
  • Input file generation on MacOSX
    There are two issues on input file generation: 1) when you generate an input file on MacOSX Yambo is not able to read values already present in the input file, and reset them to the default value; 2) if yambo and ypp have the same option to generate an input file the code get confused. Please use long input strings, for example "yambo -optics" instead of "yambo -o".
  • Parallel compilation with nvfortran for nproc >=8
    Compiling yambo in parallel with nvfortran and 8 or more processor give some problem. Please compile with less processors