Defines the constants of the code and other parameters for loop dimensions. Each subroutine includes these definitions using:
More...
|
#define | Complex_f float complex |
| Single precision complex number.
|
|
#define | Complex double complex |
| Double precision complex number.
|
|
#define | FILELEN 64 |
| Default file name length.
|
|
#define | nx 8 |
| Lattice x extent.
|
|
#define | ny nx |
| Lattice y extent. We normally use cubic lattices so this is the same as nx.
|
|
#define | nz nx |
| Lattice z extent. We normally use cubic lattices so this is the same as nx.
|
|
#define | nt 16 |
| Lattice temporal extent. This also corresponds to the inverse temperature.
|
|
#define | gvol (nx*ny*nz*nt) |
| Lattice volume.
|
|
#define | gvol3 (nx*ny*nz) |
| Lattice spatial volume.
|
|
#define | npx 1 |
| Processor grid x extent. This must be a divisor of nx.
|
|
#define | npy npx |
| Processor grid y extent.
|
|
#define | npz npx |
| Processor grid z extent.
|
|
#define | npt 1 |
| Processor grid t extent.
|
|
#define | nproc (npx*npy*npz*npt) |
| Number of processors for MPI.
|
|
#define | nthreads 16 |
| Number of threads for OpenMP, which can be overwritten at runtime.
|
|
#define | ksizex (nx/npx) |
| Sublattice x extent.
|
|
#define | ksizey (ny/npy) |
| Sublattice y extent.
|
|
#define | ksizez (nz/npz) |
| Sublattice z extent.
|
|
#define | ksize ksizex |
| Sublattice spatial extent for a cubic lattice.
|
|
#define | ksizet (nt/npt) |
| Sublattice t extent.
|
|
#define | nf 1 |
| Fermion flavours (double it)
|
|
#define | kvol (ksizet*ksizez*ksizey*ksizex) |
| Sublattice volume.
|
|
#define | kvol3 (ksizez*ksizey*ksizex) |
| Sublattice spatial volume.
|
|
#define | niterc gvol |
| Hard limit for runaway trajectories in Conjugate gradient.
|
|
#define | nc 2 |
| Colours.
|
|
#define | nadj 3 |
| adjacent spatial indices
|
|
#define | ndirac 4 |
| Dirac indices.
|
|
#define | ndim 4 |
| Dimensions.
|
|
#define | ngorkov 8 |
| Gor'kov indices.
|
|
#define | kmom (ndim*nadj*kvol) |
| sublattice momentum sites
|
|
#define | kferm (nc*ngorkov*kvol) |
| sublattice size including Gor'kov indices
|
|
#define | kferm2 (nc*ndirac*kvol) |
| sublattice size including Dirac indices
|
|
#define | halox 0 |
| x Halo size
|
|
#define | haloy 0 |
| y Halo size
|
|
#define | haloz 0 |
| z Halo size
|
|
#define | halot 0 |
| t Halo size
|
|
#define | halo (2*(halox+haloy+haloz+halot)) |
| Total Halo size.
|
|
#define | kfermHalo (nc*ngorkov*(kvol+halo)) |
| Gor'kov lattice and halo.
|
|
#define | kferm2Halo (nc*ndirac*(kvol+halo)) |
| Dirac lattice and halo.
|
|
#define | kmomHalo (ndim*nadj*(kvol+halo)) |
| Momentum lattice and halo.
|
|
#define | respbp 3.2E-5 |
| Conjugate gradient residue for \(\langle\bar{\Psi}\Psi\rangle\).
|
|
#define | rescgg 2.26E-5 |
| Conjugate gradient residue for update.
|
|
#define | rescga 2.26E-8 |
| Conjugate gradient residue for acceptance.
|
|
#define | AVX 16 |
| Alignment of arrays. 64 for AVX-512, 32 for AVX/AVX2. 16 for SSE. Since AVX is standard on modern x86 machines I've called it that.
|
|
Defines the constants of the code and other parameters for loop dimensions. Each subroutine includes these definitions using:
INCLUDE sizes.h
Or at least they used to. But this is the C version, so no need for that. Include once in each source file and it should work just fine.
The only potential snag is that including the header makes its content global in scope. Where this could cause an issue we shall instead declare the variable inside the function and its scope shall override that of the global variable.
I've tried keeping the comments as close to the original as possible. Of course some magic numbers will be redundant and some will need to be added or redefined. Anything that was commented out has been left commented out with a second C commented out version beneath it.
- Author
- D. Lawlor September 2020
Definition in file sizes.h.