Installation¶
Important files and directories¶
doc/Directory for manualsdoc/index.html: Index page
src/: Directory for the sources of the libraryexample/: Directory for the sample programtest/: Directory for testsconfigure: Configuration script for the build
Prerequisite¶
libtetrabz requires the following
fortran and C compiler
MPI library (If you use MPI/Hybrid version)
Installation guide¶
Download
.tar.gzfile from following web page.Uncompress
.tar.gzfile and enter the generated directory.$ tar xzvf xzvf libtetrabz_1.0.1.tar.gz $ cd libtetrabz
Configure the build environment.
$ ./configure --prefix=install_dir
Then, this script checks the compiler and the libraries required for the installation, and creates Makefiles.
install_dirindicates the full path of the directory where the library is installed (you should replace it according to your case). If none is specified,/use/local/is chosen for storing libraries bymake install(Therefore, if one is not the admin,install_dirmust be specified to the different directory).configurehas many options, and they are used according to the environment etc. For more details, please see Options for configure.After
configurefinishes successfully and Makefiles are generated, please type$ maketo build libraries. Then please type
$ make install
to store libraries and the sample program to
install_dir/libandinstall_dir/bin, respectively. Although one can use libraries and the sample program withoutmake install, they are a little different to the installed one.Add the libtetrabz’s library directory (
install_dir/lib) to the search path of the dynamically linked program (environment variableLD_LIBRARY_PATH).$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:install_dir/lib
Sample programs using
libtetrabzare also compiled inexample/.example/dos.x: Compute DOS of a tight-binding model in the cubic lattice. The source code isdos.f90
Density of states of the tight-binding model on the cubic lattice calculated by using
dos.x. The solid line indicates the result converged about the number of \(k\). “ \(+\) “ and “ \(\times\) “ indicate results by using the linear tetrahedron method and the optimized tetrahedron method, respectively with \(8\times8\times8 k\) grid.¶example/lindhard.x: Compute the Lindhard function. The source code islindhard.f90
(solid line) The analytical result of the Lindhard function. “ \(+\) “ and “ \(\times\) “ indicate results by using the linear tetrahedron method and the optimized tetrahedron method, respectively with \(8\times8\times8 k\) grid.¶
Options for configure¶
configure has many options and environment variables.
They can be specified at once. E.g.
$ ./configure --prefix=/home/libtetrabz/ --with-mpi=yes FC=mpif90
All options and variables have default values. We show a part of them as follows:
---prefix
Default:
---prefix=/usr/local/. Specify the directory where the library etc. are installed.
--with-mpi
Default:
--with-mpi=no(without MPI). Whether use MPI (--with-mpi=yes), or not.
--with-openmp
Default:
--with-openmp=yes(with OpenMP). Whether use OpenMP or not (--with-openmp=no).
--enable-shared
Default:
--enable-shared. Whether generate shared library.
--enable-static
Default:
--enable-static. Whether generate static library.
FC, C
Default: The fortran/C compiler chosen automatically from those in the system. When
--with-mpiis specified, the corresponding MPI compiler (such asmpif90) is searched. IfFCprinted the end of the standard-output ofconfigureis not what you want, please set it manually as./configure FC=gfortran.
--help
Display all options including above, and stop without configuration.