Compile the libraries in Yambo independently: Difference between revisions
No edit summary |
No edit summary |
||
Line 21: | Line 21: | ||
First of all create a folder where you want install them, in our case: /home/pippo/mylib | First of all create a folder where you want install them, in our case: /home/pippo/mylib | ||
We start from hdf5, unpack the library and then configure it with the command: | We start from '''hdf5''', unpack the library and then configure it with the command: | ||
cd hdf5-1.12.0/ | cd hdf5-1.12.0/ | ||
Line 28: | Line 28: | ||
make install | make install | ||
then the netcdf-c that requires the previous compiled HDF5: | then the '''netcdf-c''' that requires the previous compiled HDF5: | ||
export LD_LIBRARY_PATH="/home/ecannuccia/YamboLibs/lib:$LD_LIBRARY_PATH" | export LD_LIBRARY_PATH="/home/ecannuccia/YamboLibs/lib:$LD_LIBRARY_PATH" | ||
Line 35: | Line 35: | ||
make install | make install | ||
then the netcdf-f that requires the netcdf-c to be configured and compiled: | then the '''netcdf-f''' that requires the netcdf-c to be configured and compiled: | ||
./configure FC=ifort F77=ifort CC=icc CXX=icc --prefix=/home/pippo/mylib/ LIBS="-L/home/pippo/mylib/lib" CFLAGS="-O2 -I/home/pippo/mylib/" | ./configure FC=ifort F77=ifort CC=icc CXX=icc --prefix=/home/pippo/mylib/ LIBS="-L/home/pippo/mylib/lib" CFLAGS="-O2 -I/home/pippo/mylib/" |
Revision as of 22:19, 1 February 2022
In general Yambo requires a series of libraries: HDF5, NetCDF-c, NetCDF-f, fft, lapack, blacs, iotk, libxc
plus a series of optional libreries: yaml, slepc, petsc, blacs, scalapack, futile.
Some of this libraries are included in the Yambo package, while other are downloaded from the internet.
In general Yambo configure and compile all these libraries. However on some particular computer, configure/compilation
of a specific library can fail.
Here we will show you how to compile and install some of them and the use with Yambo.
If you configured Yambo and the compilation is stuck at some library you can find the tar.gz file of the libraries in:
lib/archive/
for example:
fftw-3.3.6-pl1.tar.gz iotk-y1.2.2.tar.gz Makefile netcdf-c-4.7.4.tar.gz package.list hdf5-1.12.0.tar.gz libxc-5.1.5.tar.gz Makefile.loc netcdf-fortran-4.5.3.tar.gz
The file package.list contains the libraries list and the link to download them.
Now we will show some example of external compilation of these libraries using intel fortran.
First of all create a folder where you want install them, in our case: /home/pippo/mylib
We start from hdf5, unpack the library and then configure it with the command:
cd hdf5-1.12.0/ ./configure FC=mpif90 CC=mpicc CXX=mpicc --enable-fortran --enable-build-mode=production --enable-parallel --prefix=/home/ecannuccia/YamboLibs/ make make install
then the netcdf-c that requires the previous compiled HDF5:
export LD_LIBRARY_PATH="/home/ecannuccia/YamboLibs/lib:$LD_LIBRARY_PATH" ./configure FC=ifort CC=icc CXX=icc --prefix=/home/pippo/mylib/ LIBS="-L/home/pippo/mylib/lib" CFLAGS="-O2 -I/home/pippo/mylib/include/" make make install
then the netcdf-f that requires the netcdf-c to be configured and compiled:
./configure FC=ifort F77=ifort CC=icc CXX=icc --prefix=/home/pippo/mylib/ LIBS="-L/home/pippo/mylib/lib" CFLAGS="-O2 -I/home/pippo/mylib/" make make install
In a similar way you can configure the other libraries. In this way you can solve problems in in each library individually.
Then you can link them in Yambo with the command:
./configure --with-hdf5-path=/home/pippo/mylib --with-netcdf-path=/home/pippo/mylib --with-netcdff-path=/home/pippo/mylib