Skip to content
forked from etmc/tmLQCD

tmLQCD is a freely available software suite providing a set of tools to be used in lattice QCD simulations. This is mainly a HMC implementation (including PHMC and RHMC) for Wilson, Wilson Clover and Wilson twisted mass fermions and inverter for different versions of the Dirac operator. The code is fully parallelised and ships with optimisations…

License

Notifications You must be signed in to change notification settings

Marcogarofalo/tmLQCD

This branch is 103 commits ahead of, 1632 commits behind etmc/tmLQCD:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

May 6, 2016
a539f62 · May 6, 2016
Feb 13, 2013
Sep 21, 2015
Oct 30, 2012
Jul 6, 2015
Dec 5, 2014
May 6, 2016
Sep 21, 2015
May 6, 2016
Jul 1, 2015
Feb 17, 2016
May 6, 2016
Jan 26, 2013
May 6, 2016
Oct 19, 2012
Oct 30, 2012
May 6, 2016
Apr 4, 2014
Apr 4, 2014
Jan 19, 2012
Apr 30, 2016
Nov 13, 2015
Sep 26, 2012
Aug 15, 2012
Apr 16, 2010
Feb 13, 2009
Sep 17, 2012
Sep 17, 2012
Jan 26, 2012
Feb 13, 2009
Apr 4, 2014
Oct 31, 2012
May 6, 2016
Jan 5, 2013
Sep 11, 2011
Dec 7, 2012
Dec 6, 2012
Dec 23, 2012
Nov 25, 2012
Jul 21, 2012
Feb 1, 2007
Jan 18, 2009
Aug 12, 2008
Feb 6, 2012
Nov 18, 2009
Jan 17, 2011
Oct 19, 2012
Jan 19, 2012
Feb 15, 2015
Feb 15, 2015
Mar 16, 2016
Mar 23, 2013
May 29, 2012
Nov 11, 2015
Nov 11, 2015
Oct 19, 2012
Feb 14, 2012
Apr 29, 2016
Apr 29, 2016
Dec 7, 2012
Nov 25, 2012
Dec 23, 2012
Nov 25, 2012
Jul 1, 2015
Jan 19, 2012
Feb 16, 2009
Dec 4, 2006
Nov 13, 2015
Mar 3, 2008
May 6, 2016
May 6, 2016
Oct 19, 2012
May 29, 2012
Feb 5, 2013
May 29, 2012
Sep 26, 2012
Sep 26, 2012
Dec 10, 2012
Dec 10, 2012
Jan 19, 2012
Feb 6, 2013
Jan 19, 2012
Jul 21, 2015
Nov 21, 2014
Feb 8, 2010
Mar 8, 2015
Mar 8, 2015
Feb 11, 2013
Feb 11, 2013
Feb 16, 2009
Feb 16, 2009
Jan 8, 2013
Jul 23, 2012
May 6, 2016
Feb 13, 2013
Jan 30, 2012
Dec 14, 2015
Apr 4, 2014
Dec 16, 2003
Apr 12, 2013
Apr 9, 2013
May 6, 2016
Dec 19, 2015
Jul 1, 2015
Feb 16, 2016
Feb 12, 2016
Feb 17, 2016
Jul 1, 2015
Oct 19, 2012
Jan 19, 2012
Oct 19, 2012
Sep 10, 2011
Dec 14, 2015
Feb 14, 2012
Feb 14, 2012
Jun 8, 2015
Mar 6, 2015
Feb 11, 2013
Feb 11, 2013
Feb 13, 2013
Sep 26, 2012
Nov 13, 2015
Nov 13, 2015
Feb 16, 2015
May 6, 2016
May 6, 2016
Dec 17, 2012
Jan 19, 2012
Jan 19, 2012
Feb 15, 2013
Oct 8, 2012
May 6, 2016
Jan 19, 2012
Jul 1, 2015
Jul 1, 2015
Jan 19, 2012
Jan 19, 2012
Jan 19, 2012
Jan 19, 2012
May 6, 2016
May 6, 2016
Feb 13, 2013
Jan 19, 2012
Dec 7, 2012
Nov 25, 2012
Jan 28, 2013
Jan 28, 2013
Jan 19, 2012
Jan 19, 2012
Apr 12, 2013
Jan 19, 2012
Oct 19, 2012
Jan 19, 2012
Sep 5, 2012
Feb 14, 2012
Nov 18, 2009
Nov 11, 2015
Nov 11, 2015
May 6, 2016
Feb 15, 2015
Feb 17, 2012
Feb 12, 2016
Feb 12, 2016
Nov 14, 2014
May 6, 2016
Mar 24, 2016
Apr 4, 2014
Dec 8, 2015
Nov 11, 2015
Dec 14, 2015
Jan 29, 2012
Feb 20, 2013
Jan 17, 2012
Apr 21, 2016
Oct 8, 2012
Nov 11, 2015

Repository files navigation

Here are some remarks collected in order to configure, compile and
install the tmLQCD programme suit. For more information, also about running
the code please read the documentation in the doc sub-directory. 

CONFIGURE and COMPILE

It is recommended to build the code not in the source directory but in
a separate directory.

The lime library (tested with version 1.2.3) is needed to compile the
program. Please download it at

http://usqcd.jlab.org/usqcd-software/c-lime/

Configure and compile lime (for documentation see
http://usqcd.jlab.org/usqcd-docs/c-lime/) first.
Then you should use the configure option --with-lime=dir for the
tmLQCD to set the correct directory where to find lime (see below). 

For more documentation please change into the doc directory and type
latex main.tex
and see the sections for configuring, installing and testing the code.

Here we have gathered some examples for some standard architectures.
Building the tmLQCD executables is a three step procedure:

****************************************************************************

1) configure:

In your build directory type

path-to-the-sources/configure --help

to get an overview of the available options and switches. In
particular check out the prefix option for your installation path. 
What follows now are some examples for a few standard architectures.

- a scalar build on a P4 machine would look like:

path-to-the-sources/configure --disable-mpi --enable-sse2 --enable-p4 \
  --enable-gaugecopy --disable-newdiracop --with-limedir=<path-to-lime> \
  --with-lapack="<linker options needed for lapack>" \
  CC=<cc>

- Opteron with SSE2:

path-to-the-sources/configure --disable-mpi --enable-sse2 --enable-opteron \
  --enable-gaugecopy --disable-newdiracop --with-limedir=<path-to-lime> \
  --with-lapack="<linker options needed for lapack>" \
  CC=<cc>

- A MPI parallel (4dims) build on a P4 cluster:

path-to-the-sources/configure --enable-mpi --enable-sse2 --enable-p4 \
  --with-mpidimension=4 --enable-gaugecopy --disable-newdiracop \
  --with-limedir=<path-to-lime> --with-lapack="<linker options needed for lapack>" \
  CC=<mpicc>

- on the Munich Altix machine:

path-to-the-sources/configure --enable-mpi --with-mpidimension=4 \
  --with-limedir=<path-to-lime> --enable-newdiracop \
  --disable-shmem --with-lapack="<linker options needed for lapack>" \
  CC=mpicc CFLAGS="-mcpu=itanium2 -O3 -g -c99 -mtune=itanium2" 

for lapack on this machine please type
module load mkl


- on the HLRB ice installation use

path-to-the-sources/configure --enable-mpi --with-mpidimension=4 \
   --disable-sse2 --disable-p4  --with-limedir=<path-to-lime> \
   --enable-newdiracop --with-lapack="<linker options needed for lapack>" \
   CC="mpicc -std=c99" CFLAGS="-g" \

where it is again important to use the Intel C compiler! 

for lapack first load the module mkl and then use

--with-lapack="-L$LIBRARY_PATH -llapack -lblas"

- on Blue Gene installations

For the Blue Gene L and P see the README.bg? files

For BG/Q you can enable QPX intrinsics with --enable-qpx, which will have
effect only with the XLC compiler.

You may enable or disable other configure options as needed. See the
documentation for more details.

****************************************************************************

2) make

type `make` in your build directory.

If there appears no error message during compilation you should end up
with a few executable in the build directory, namely `hmc_tm`,
`invert` and `invert_doublet`.

****************************************************************************

3) make install

type `make install`

to get the executables installed.



****************************************************************************
****************************************************************************

in the following we provide a "codemap", giving a short explanation
for the contents of each c-file:

****************************************************************************
top directory: apart from the main routines all routines are compiled into
	       the run-time library libhmc.

DML_crc32.c: invert, invert_doublet, hmc_tm
	     some helper functions to compute the SCIDAC 
	     checksum
D_psi.c:     invert, invert_doublet, hmc_tm
	     Wilson twisted mass Dirac operator, not even/odd 
	     preconditioned 
Hopping_Matrix.c: invert, invert_doublet, hmc_tm
	     Hopping matrix for the even/odd preconditioned 
	     Dirac operator
Hopping_Matrix_nocom.c: benchmark
	     Hopping matrix for the even/odd preconditioned 
	     Dirac operator, communication switched off
Nondegenerate_Matrix.c: invert_doublet, hmc_tm
	     operators needed for even/odd preconditioning 
	     the non-degenerate flavour doublet Dirac operator
Ptilde_nd.c: hmc_tm
	     the more precise polynomial $\tilde P$ needed for 
	     the PHMC for the non-degenerate flavour doublet
benchmark.c: main routine
	     benchmark code for D_psi and Hopping_Matrix
block.c:     experimental
boundary.c:  invert, invert_doublet, hmc_tm
	     implements the twisted boundary conditions for the
	     spinor fields
chebyshev_polynomial.c: experimental
chebyshev_polynomial_nd.c: hmc_tm
	     implements the generation of coefficients for the 
	     chebyshev polynomial using the clenshaw recursion 
	     relation
deriv_Sb.c:  hmc_tm
	     the variation of Q=gamma_5 D with respect to the 
	     gauge fields in the even/odd case 
deriv_Sb_D_psi.c: hmc_tm
	     the variation of Q=gamma_5 D with respect to the 
	     gauge fields in the non even/odd case 
det_monomial.c: hmc_tm
	     implements the functions needed for a det monomial
detratio_monomial.c: hmc_tm
	     implements the functions needed for a detratio monomial
poly_monomial.c: hmc_tm
             implements function needed for a POLY monomial 
             (PHMC for light degenerate quarks)
dml.c:       invert, invert_doublet, hmc_tm
	     some helper functions to compute the SCIDAC 
	     checksum
double2single.c: main routine
	     can convert a gauge field from double to single precision
single2double.c: main routine
	     can convert a gauge field from single to double precision
eigenvalues_bi.c: hmc_tm
	     computes eigenvalues of the mass non-degenerate two flavour 
	     Dirac operatoe
expo.c:      hmc_tm
	     implements the exponetial function of an su(3) element
gamma.c:     invert, invert_doublet, hmc_tm
	     implements multiplication of gamma matrices and some useful
	     combination of those with a spinor field
gauge_io.c:  invert, invert_doublet, hmc_tm
	     IO routines for gauge fields 
gauge_monomial.c: hmc_tm
	     implements the functions needed for a gauge monomial
gen_sources.c: invert, invert_doublet, hmc_tm
	     implements the generation of source spinor fields
geometry_eo.c: invert, invert_doublet, hmc_tm
	     anything related to gauge and spinor field geometry
get_rectangle_staples.c: hmc_tm
             computes rectangular staples of gauge links as needed for
	     e.g. the Iwasaki gauge action and its derivative
get_staples.c: hmc_tm
             computes plaquette staples of gauge links as needed for
	     for all gauge actions and their derivatives
getopt.c:    invert, invert_doublet, hmc_tm
	     needed for command line options
hmc_tm.c:    main routine
	     hmc_tm executable
hybrid_update.c: hmc_tm
	     implements the functions for the gauge field update and
	     the momenta update
init_bispinor_field.c 
init_chi_copy.c
init_chi_spinor_field.c
init_dirac_halfspinor.c
init_gauge_field.c
init_gauge_tmp.c
init_geometry_indices.c
init_moment_field.c
init_spinor_field.c
init_stout_smear_vars.c: invert, invert_doublet, hmc_tm
	     provide routines to allocate memory for the corresponding
	     objects
integrator.c: hmc_tm
	     implements the routines needed for the integrator in the
	     MD udpate
invert.c:    main routine
	     invert executable
invert_doublet.c: main routine
	     invert_doublet executable
invert_doublet_eo.c: invert_doublet
	     performs an inversion of the flavour doublet operator using
	     even/odd preconditioning and the CG solver
invert_eo.c: invert
	     performs an inversion of the Wilson twisted mass Dirac operator
	     using a solver as specified in the input file. Depending on the 
	     input file even/odd preconditioning is used or not
io.c:        invert, invert_doublet, hmc_tm
	     helper routines: some deprecated IO routines for gauge and spinor 
	     spinor fields, and the routine writing the initial stdout message
	     of the executables
io_utils.c:  invert, invert_doublet, hmc_tm
	     IO helper routines related to swap endian and checksums
linsolve.c:  hmc_tm
	     CG and bicgstab solvers as used only in the HMC
little_D.c:  experimental
measure_rectangles.c: hmc_tm
	     computes the gauge action related to the rectangular part
monomial.c:  hmc_tm
             provides the definition for monomials and initialisation functions
mpi_init.c:  invert, invert_doublet, hmc_tm, benchmark
	     MPI initialisation routine
ndpoly_monomial.c: hmc_tm
	     implements the functions needed for a ndpoly monomial
observables.c: hmc_tm, invert, invert_doublet
	     computes the gauge action related to the Wilson plaquette part
online_measurement.c: hmc_tm
	     anything related to online measurements
phmc.c       hmc_tm
	     functions and variables as needed for the PHC
polyakov_loop.c: hmc_tm
	     measures the polyakov loop
propagator_io.c: invert, invert_doublet, hmc_tm
	     functions related to spinor field IO
ranlxd.c:    invert, invert_doublet, hmc_tm
	     RANLUX random number generator (64 Bit)
ranlxs.c:    invert, invert_doublet, hmc_tm
	     RANLUX random number generator (32 Bit)
read_input.l: invert, invert_doublet, hmc_tm
             definition of the input file parser (flex)
reweighting_factor.c: experimental
reweighting_factor_nd.c: experimental
sighandler.c: invert, invert_doublet, hmc_tm
	     handles signal related to illegal instructions
start.c:     invert, invert_doublet, hmc_tm
	     functions needed to give initial values to gauge and spinor fields
stout_smear.c: invert, invert_doublet
	     functions to stout smear a given gauge configuration
stout_smear_force.c: experimental
tm_operators.c: invert, invert_doublet, hmc_tm
	     operators needed for even/odd preconditioning the Wilson
	     twisted mass Dirac operator
update_backward_gauge.c: invert, invert_doublet, hmc_tm
	     functions to update the gauge copy
update_momenta.c: hmc_tm
	     function to update the momenta in the HMC MD part
update_tm.c: hmc_tm
	     the HMC MD part
xchange_2fields.c: invert, invert_doublet, hmc_tm
	     implements the MPI communication of two even/odd spinor fields
	     at once
xchange_deri.c: hmc_tm
	     implements the MPI communication of derivatives
xchange_field.c: invert, invert_doublet, hmc_tm
	     implements the MPI communication of a single even/odd spinor
	     field
xchange_gauge.c: invert, invert_doublet, hmc_tm
	     implements the MPI communication of the gauge field
xchange_halffield.c: invert, invert_doublet, hmc_tm
	     implements the MPI communication of a half spinor field
xchange_lexicfield.c: invert, invert_doublet, hmc_tm
	     implements the MPI communication of a single (full) spinor
	     field

****************************************************************************
the linalg directory: all routines here are compiled into the liblinalg
                      runtime library
                      capital letters are spinor fields, others scalars
add.c:                Q = R + S
assign.c:             R = S
assign_add_mul.c:     P = P + c Q with c complex
assign_add_mul_r.c:   P = P + c Q with c real
assign_add_mul_add_mul.c:   R = R + c1*S + c2*U with c1 and c2 complex variables
assign_add_mul_add_mul_r.c: R = R + c1*S + c2*U with c1 and c2 real variables
assign_diff_mul.c:    S=S-c*Q
assign_mul_add_mul_add_mul_add_mul_r.c: R = c1*R + c2*S + c3*U + c4*V
			 		with c1, c2, c3, c4 real variables
assign_mul_add_mul_add_mul_r.c:         R = c1*R + c2*S + c3*U 
					with c1, c2 and c3 real variables
assign_mul_add_mul_r.c:     R = c1*R + c2*S , c1 and c2 are real constants 
assign_mul_add_r.c:         R = c*R + S  c is a real constant
assign_mul_bra_add_mul_ket_add.c:       R = c2*(R + c1*S) + (*U)
					with c1 and c2 complex variables
assign_mul_bra_add_mul_ket_add_r.c:     R = c2*(R + c1*S) + (*U)
					with c1 and c2 complex variables
assign_mul_bra_add_mul_r.c:             R = c1*(R + c2*S)
					with c1 and c2 complex variables
comp_decomp.c:                          Splits the Bi-spinor R in the spinors S and T 
convert_eo_to_lexic.c:                  convert to even odd spinors to one full spinor
diff.c:                 Q = R - S
diff_and_square_norm.c: Q = R - S and ||Q||^2
mattimesvec.c:          w = M*v for complex vectors w,v and and complex square matrix M
mul.c:                  R = c*S, for complex c
mul_r.c:                R = c*S, for real c
mul_add_mul.c:          R = c1*S + c2*U , c1 and c2 are complex constants
mul_add_mul_r.c         R = c1*S + c2*U , c1 and c2 are real constants
mul_diff_mul.c:         R = c1*S - c2*U , c1 and c2 are complex constants
mul_diff_mul_r.c        R = c1*S - c2*U , c1 and c2 are real constants
mul_diff_r.c            R = c1*S - U , c1 is a real constant 
scalar_prod.c:          c = (R, S)
scalar_prod_i.c:        c = Im(R, S)
scalar_prod_r.c:        c = Re(R, S)
square_and_prod_r.c:    Returns Re(R,S) and the square norm of S
square_norm.c:          c = ||Q||^2

****************************************************************************
solver directory: all routines here are compiled into the libsolver
                  runtime library
		  the solvers are for spinor fields, if not indicated
		  otherwise.

Msap.c:                 experimental SAP preconditioner
bicgstab_complex.c:     BiCGstab for complex fields
bicgstabell.c:          experimental
cg_her.c :              CG solver for hermitian operators
cg_her_nd.c:            CG solver for hermitian heavy doublet operators
cgs_real.c:             CGS solver
chrono_guess.c:         routines for the chronological solver
dfl_projector.c:        experimental
diagonalise_general_matrix.c:  subroutine to diagonalise a complex n times n
                               matrix. Input is a complex matrix in _C_ like
                               order. Output is again _C_ like. Uses lapack
eigenvalues.c           compute the nr_of_eigenvalues lowest eigenvalues
                        of (gamma5*D)^2
fgmres.c:               FGMRES (flexible GMRES) solver
gcr.c:                  GCR solver
gcr4complex.c:          GCR solver for complex fields
generate_dfl_subspace.c: experimental
gmres.c:                GMRES solver
gmres_dr.c:             GMRES-DR solver
gmres_precon.c:         GMRES usable for preconditioning other solvers (experimental)
gram-schmidt.c:         Gram-Schmidt orthonormalisation routines
jdher.c:                Jacobi Davidson for hermitian matrices (to compute EVs)
lu_solve.c:             compute the inverse of a matrix with LU decomposition
mr.c:                   MR solver
pcg_her.c:              PCG solver
poly_precon.c:          polynomial preconditioner using Chebysheff polynomials
			with complex argument
quicksort.c:            a quicksort routine
sub_low_ev.c:           routines to subtract exactly computed eigenvectors from
			a given spinor field

About

tmLQCD is a freely available software suite providing a set of tools to be used in lattice QCD simulations. This is mainly a HMC implementation (including PHMC and RHMC) for Wilson, Wilson Clover and Wilson twisted mass fermions and inverter for different versions of the Dirac operator. The code is fully parallelised and ships with optimisations…

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 75.2%
  • Cuda 16.6%
  • C++ 3.5%
  • SourcePawn 1.7%
  • Lex 1.6%
  • Makefile 0.8%
  • Other 0.6%