Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
98413ce
replacing cudaMalloc with device_malloc
pittlerf Nov 8, 2022
40b27d1
correcting typos
pittlerf Nov 10, 2022
a6516d6
Merge remote-tracking branch 'origin/heavy_light_tetraquark' into hip…
pittlerf Nov 14, 2022
42e59da
correcting possible error in M diagrams for NJN -pion and correcting …
pittlerf Nov 15, 2022
e557e51
compiliting tetraquarks kernels only when udsc baryons are set
pittlerf Nov 18, 2022
8c18dbc
replacing cudaMalloc with quda-s device_malloc
pittlerf Nov 18, 2022
f03e892
momentum setting for the threept functions Npi =J = Npi
pittlerf Nov 18, 2022
13f6016
continue hipify
pittlerf Nov 21, 2022
92677e9
update nucleon 2pt 3pt
pittlerf Nov 21, 2022
2c6edb8
continue hipify
pittlerf Nov 21, 2022
93c3174
pack propagator as sink routine to the library
pittlerf Dec 5, 2022
55c5688
adding packing routines for fermions
pittlerf Dec 6, 2022
56bf3fb
correcting pack_fermion_to_sink
pittlerf Dec 6, 2022
db3716b
N J Npi calculation
pittlerf Dec 9, 2022
c936036
B,W diagrams for N- J-Npi
pittlerf Dec 11, 2022
e8268e5
working on the threept functions
pittlerf Dec 11, 2022
b24d676
removing debug printf
pittlerf Dec 12, 2022
188ffad
changing the order of propagators in M7/M8 Thanks Yan
pittlerf Dec 12, 2022
971790a
correcting comm_get_rank_from_coords
pittlerf Dec 12, 2022
82fd193
version for xcheck with Yan Li
pittlerf Dec 12, 2022
b6a55e8
correcting from source to sink and as sink for both PLEGMA Vector and…
pittlerf Dec 13, 2022
54539c6
including Z_diagrams for std vectors of ScattCorrelator object
pittlerf Dec 13, 2022
9a17957
including Z diagrams
pittlerf Dec 13, 2022
509d7a4
do not store the final diagrams for all source sink separations
pittlerf Dec 13, 2022
2d67903
correcting typos and small mistakes
pittlerf Dec 13, 2022
fc1dbbf
V3 kernel for all the insertion gammas, correcting meson gamma initial
pittlerf Dec 13, 2022
0c88675
temporary solution for Z diagrams in the NJNpi case
pittlerf Dec 14, 2022
46f1722
setting the fermion always unsmeared at the insertion and smeared at …
pittlerf Dec 14, 2022
4ae45e6
correcting some typos
pittlerf Dec 14, 2022
8a5a76c
correcting error in packing
pittlerf Dec 15, 2022
7f101da
including boundary condition for the 3pt function
pittlerf Dec 15, 2022
540baae
correcting typos including some debugging
pittlerf Dec 15, 2022
33b350a
correcting typo
pittlerf Dec 16, 2022
444d31f
adding load after each copy from HOST
pittlerf Dec 16, 2022
bb33f98
free some memory place with quda device free
pittlerf Dec 16, 2022
3fe9a8a
apply the correct Boundary condition and correct some typos
pittlerf Dec 16, 2022
8f0585f
small rewriting of from_source_to_sink routine for propagators
pittlerf Dec 18, 2022
f30163e
correcting two bugs: 1 in the absorb of doing the point to all, anoth…
pittlerf Dec 18, 2022
47df23f
before V2,V4 reduction in B,W diagrams pack stochastic propagators to…
pittlerf Dec 19, 2022
2761c87
Z diagrams without oet
pittlerf Dec 22, 2022
ec9b98d
adding possibility mom column 3 in V3V2reductions for Diagrams NjNpi
pittlerf Dec 23, 2022
8b8e09f
correcting smearing
pittlerf Dec 23, 2022
a0247f7
adding 2pt functions
pittlerf Dec 29, 2022
d7b6daa
Z diagram for 3pt now with gamma_f2 calculated
pittlerf Dec 30, 2022
da2d1ec
wrapper functions for memcpy and memset in order to avoid tuning prob…
pittlerf Jan 11, 2023
6fc8708
replacing qudaMemcpy and memset with the PLEGMA ones where needed
pittlerf Jan 11, 2023
9ed0967
correcting packing routines and include static bool variable to do th…
pittlerf Jan 13, 2023
101abea
correcting boundary Sign for 3pt function
pittlerf Jan 13, 2023
deabb21
static variable added
pittlerf Jan 13, 2023
fc62bac
typo corrected
pittlerf Jan 13, 2023
313851e
Add ToolYan, testYan
lee14916 Jan 15, 2023
307e9a5
recent changes in nucleon 3pt code
pittlerf Jan 19, 2023
4c9a63d
removing verbose and unnecessary lines
pittlerf Jan 19, 2023
67f1619
correcting default sign of P for the V4,V2 reduction
pittlerf Jan 19, 2023
3277bb7
removing debug printf
pittlerf Feb 10, 2023
b47290b
moving writiing out N0 outside pi2 loop, thanks Yan
pittlerf Feb 10, 2023
521fcf1
correct name fOR M diagrams
pittlerf Feb 10, 2023
34edaa1
remove debug absorb function no longer needed
pittlerf Feb 20, 2023
550e7f0
Merge remote-tracking branch 'origin/hip_compile' into hip_compile_Yan
lee14916 Mar 22, 2023
ee01a81
remove assertion for name_of_diagram & ToolYan
lee14916 Mar 27, 2023
6eae74d
include more cases for apply_g5
lee14916 Mar 27, 2023
34e92e4
add pi0Insertion
lee14916 Mar 30, 2023
abf6486
pi0 loop
lee14916 Apr 13, 2023
2c553a6
pi0Loop update
lee14916 Apr 13, 2023
fe470b6
insertionLoop
lee14916 Apr 18, 2023
230c470
loops with samples saved
lee14916 Apr 25, 2023
95af29e
Change in the absorb function; defined a direction of the staple in t…
May 1, 2023
3c6c43d
merging
May 1, 2023
405bc66
convert D1ff diagrams to triangle diagrams
pittlerf May 5, 2023
8b552bb
including diagrams for the extended GEVP proton pi zero and neutron p…
pittlerf May 5, 2023
37b1fd2
adding Yan stuff the CMakeLists
pittlerf May 5, 2023
329c084
convert ot etmc basis
pittlerf May 5, 2023
861adb3
merging
pittlerf May 5, 2023
411d499
CMakeLists
lee14916 May 6, 2023
3b9a9ad
for merge
lee14916 May 6, 2023
99def48
correcting compilation error
pittlerf May 6, 2023
c7287bc
CMakeLists
lee14916 May 6, 2023
1b87f29
Merge remote-tracking branch 'origin/hip_compile' into hip_compile_Yan
lee14916 May 6, 2023
606b9f3
adding etmc basis change function
pittlerf May 6, 2023
cb44316
Merge remote-tracking branch 'origin/hip_compile' into hip_compile_Yan
lee14916 May 6, 2023
0ea0dab
correcting for compilation error
pittlerf May 6, 2023
be31cf5
the d1ff diagrams can be combined from the T reductions either by tak…
pittlerf May 7, 2023
f22909b
Merge remote-tracking branch 'origin/hip_compile' into hip_compile_Yan
lee14916 May 7, 2023
e0609ed
correcting compilation error
pittlerf May 7, 2023
96ae128
Merge remote-tracking branch 'origin/hip_compile' into hip_compile_Yan
lee14916 May 7, 2023
9e9cc80
include sigma aka f0(500)
lee14916 May 17, 2023
41271bb
saving W29-32 diagrams and correcting D1ff
pittlerf May 31, 2023
b41d5bd
comment for mom convention of loops
lee14916 Jun 6, 2023
2afbf23
correcting Di11 10 diagram
pittlerf Jun 14, 2023
e7be948
correcting W21-24 diagrams
pittlerf Jun 14, 2023
d3ba4fc
correcting W33-36
pittlerf Jun 15, 2023
db9f36f
Merge remote-tracking branch 'origin/hip_compile' into hip_compile_Yan
lee14916 Jun 16, 2023
0ee6e2e
correcting sign problem in Tseq 2526, correcting momentum problem in …
pittlerf Jun 16, 2023
16fc010
correcting D1ii and W diagrams
pittlerf Jun 18, 2023
f173e9e
Merge remote-tracking branch 'origin/hip_compile' into hip_compile_Yan
lee14916 Jun 19, 2023
d1091a2
correcting conjugation of momentum for W33,34,35,36 for D1ii and W co…
pittlerf Jun 19, 2023
68ca959
correct hdf5 group name
lee14916 Jun 22, 2023
2ce31f0
production file for NJN
pittlerf Jul 8, 2023
b9d8c28
correcting B7, B8 sequential part, and the V2,V4 for twopoint (has be…
pittlerf Aug 7, 2023
dfbc347
including packing for the backward part
pittlerf Aug 21, 2023
c74c0b2
working on adding backward part to all the 2pt function
pittlerf Aug 21, 2023
35bb153
progressing of adding backward part
pittlerf Aug 23, 2023
73bf0c5
working on the backward part
pittlerf Aug 23, 2023
0723612
finalizing the inclusion of the backward part (checked)
pittlerf Aug 31, 2023
6c342a0
pi0Insert including P and jPi diagrams
lee14916 Sep 8, 2023
dfaf050
add flagfile option
lee14916 Sep 19, 2023
a606c5d
correcting backward part of W
pittlerf Oct 5, 2023
4ecd106
working on QUDA eigensolver
pittlerf Oct 18, 2023
2d511fc
adding blocksize option
pittlerf Oct 19, 2023
50233e2
set eigsolver up for using m^dag m
Oct 20, 2023
c4462ac
working QUDA_EIG eigensolver
pittlerf Oct 26, 2023
fcf1c04
set up testing of low mode avg contractions
Nov 8, 2023
92f71b9
adding some executables
pittlerf Nov 10, 2023
d51d935
Implemented contraction for MesonsOpen.
Nov 10, 2023
c782a79
fixing transpose sign for those involving PhiPhi
lee14916 Nov 14, 2023
a3dca23
testing of lowModeAvg
Nov 15, 2023
2d7d8d1
including tensor charges gamma structures
pittlerf Nov 16, 2023
c3bb6e4
correcting some bugs
pittlerf Nov 17, 2023
12949a9
merging with Yan's branch
pittlerf Nov 20, 2023
fa679e4
Only determine upper triangle of contractions in LowModeAvg
Nov 20, 2023
9b7c957
commenting out arpack logs
Nov 20, 2023
18f4419
adding sm_80 for the GPU_ARCH list
pittlerf Nov 20, 2023
40e0f8e
removing Cgigt from gammas_scatt due to not enough constant memory
pittlerf Nov 20, 2023
2d6747b
Merge remote-tracking branch 'origin/hip_compile' into HEAD
pittlerf Nov 20, 2023
be69feb
merging
Nov 21, 2023
9048db3
including eigvecnum feature to the ScattCorrelator class
Nov 21, 2023
11548b8
Merge remote-tracking branch 'origin/hip_compile' into leonardo_defla…
Nov 21, 2023
9d50b65
writing only once
Nov 21, 2023
6269180
correcting errors
Nov 21, 2023
41023c9
correcting the shape of the dataset
Nov 21, 2023
65097a0
correcting some bugs
Nov 21, 2023
a865c12
added improved version of LowModeAvg
Nov 22, 2023
e358238
include tensor
lee14916 Dec 12, 2023
8a97683
Merge remote-tracking branch 'origin/hip_compile_Yan' into hip_compile
pittlerf Dec 13, 2023
3b7b923
correcting dimension of P diagram
pittlerf Jan 25, 2024
5ce25ef
making compatible with the latest QUDA develop branch
pittlerf Jul 8, 2024
58aa350
working on integrating the latest quda branch
pittlerf Jul 9, 2024
4f91dea
finalizing with the latest QUDA branch, nucleon 2pt crosschecked
pittlerf Jul 11, 2024
5445bf3
correcting error
pittlerf Jul 15, 2024
bc07cab
removing individual diagrams from the library and adding a function R…
pittlerf Sep 18, 2024
659904e
inlude executables
pittlerf Sep 18, 2024
697cf96
Merge branch 'hip_compile' of https://github.com/cylqcd/PLEGMA into HEAD
pittlerf Sep 18, 2024
c88c307
executable computing nsigma threepoint functions
pittlerf Oct 5, 2024
e8a871c
progressing with the recombination for the sigma nucleon
pittlerf Oct 23, 2024
f96e64e
updating N sigma analysis
pittlerf Nov 15, 2024
83f65b5
correcting bug
pittlerf Nov 18, 2024
1812520
incorporating the multiple right hand side solver
pittlerf Nov 18, 2024
1c822be
applying the multiple right hand side solve to Calc_2pt
pittlerf Nov 18, 2024
c555c7a
checking the number of iterations returned by QUDA
pittlerf Nov 27, 2024
0c586ac
making it compatible with the current quda version
Jan 16, 2025
2b50989
saving the stochastic source in float precision
Jan 16, 2025
57b36a2
reworking a bit the multi-rhs approach, defining a solver for PLEGMA_…
Jan 21, 2025
44ea541
working on the multiple right hand side implementation
Jan 23, 2025
a3080af
compiling multiple righthandside rewriting
Feb 4, 2025
cce7647
working on multiple right hand side
Feb 11, 2025
f0cd482
executable for computing 1/2 scattering length in the nucleon channel
Feb 11, 2025
3b2a02e
packing from P+A and P-A propagators
Feb 11, 2025
d5c4800
correcting absorb routine for p+a and p-a boundary conditions
Feb 13, 2025
05d78a2
performing HEX smearing on the gauge field
Feb 13, 2025
583e5af
returning error when Propagator solve is called with num_src != 12
Feb 15, 2025
0ae0557
implementing pion for p+a, p-a boundary conditions
Feb 26, 2025
19d8784
saving pion for p+a and p-a boundary conditions
Feb 27, 2025
7c6abc4
implementing the nucleon
Feb 27, 2025
4d18d44
progressing with the piN 1/2 scattering wilson code
Apr 3, 2025
cde902d
working on the 1/2 scattering code
pittlerf Apr 9, 2025
070c7d5
adding factors for the stochastic propagator part and including seque…
pittlerf Apr 9, 2025
b1ba800
including first B diagrams
pittlerf Apr 9, 2025
1d8f805
Calc2pt reproduces results from commit -m 3b7b9235b09a1c9ccbd463b6ab7…
Apr 24, 2025
416a5f2
all the B diagrams ready for the I=1/2 Wilson code
Apr 28, 2025
f15960f
including W,Z diagrams in the N=1/2 code
May 5, 2025
e2f58e7
correcting bug in piN_diagrams
May 5, 2025
5e7cd13
including sm factors for Grace Hopper cards
Nov 20, 2025
26d3ffd
adding wflow and solving bug for interface to multiplication of the D…
Nov 20, 2025
c611f36
include forgetted header
Nov 20, 2025
3ff487f
adding LIBE stuff to my branch
pittlerf Feb 3, 2026
60d1a3a
removing Tetraquarks
pittlerf Feb 3, 2026
3332676
finish adding LIBE stuff
pittlerf Feb 4, 2026
51631f4
including Christians Kummers code, and the LIBE stuff
Mar 18, 2026
fdf7ba8
uploading delta J N threepoint function
Apr 10, 2026
31632cb
Finalizing NJDeltamatrix element code
Jun 11, 2026
903241a
updating njdelta
Jun 12, 2026
ba510c5
adding missing header
Jun 12, 2026
fd8a389
adding delta 2pt functions
Jun 16, 2026
bb8f93b
latest version of NJDelta
Jul 1, 2026
e9679a8
correcting bug
Jul 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS DEVEL RELEASE STRICT DEBUG
string(REPLACE ":" ";" LIBRARY_DIRS $ENV{LD_LIBRARY_PATH})

set(DEFAULT_GPU_ARCH sm_60)
set(GPU_ARCH ${DEFAULT_GPU_ARCH} CACHE STRING "set the GPU architecture (sm_20, sm_21, sm_30, sm_35, sm_37, sm_50, sm_52, sm_60, sm_70)")
set_property(CACHE GPU_ARCH PROPERTY STRINGS sm_20 sm_21 sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_70)
set(GPU_ARCH ${DEFAULT_GPU_ARCH} CACHE STRING "set the GPU architecture (sm_20, sm_21, sm_30, sm_35, sm_37, sm_50, sm_52, sm_60, sm_70, sm_80, sm_90)")
set_property(CACHE GPU_ARCH PROPERTY STRINGS sm_20 sm_21 sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_70 sm_80 sm_90)

# max threads
set(PLEGMA_MAX_THREADS 256 CACHE INT "maximum number of threads per block in tuner")
Expand Down
5 changes: 3 additions & 2 deletions include/PLEGMA_BLAS.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <cublas_v2.h>
#include <mpi.h>
#include <PLEGMA_utils.h>
#include <quda_api.h>
#pragma once
enum OPER_MATR_BLAS {NOTRANS, TRANS, DAGGER};
namespace cBLAS{
Expand Down Expand Up @@ -233,7 +234,7 @@ namespace cuBLAS{
if(trans == NOTRANS) PLEGMA_error("Use gemv without MPI comm");
if(comm == MPI_COMM_NULL) PLEGMA_error("Communicator is NULL and cannot be used for MPI reduction");
cuBLAS::gemv_(trans, m, n, alpha, A, x, beta, y);
cudaMemcpy(yHost,y,n*2*sizeof(Float),cudaMemcpyDeviceToHost);
qudaMemcpy(yHost,y,n*2*sizeof(Float),qudaMemcpyDeviceToHost);
checkQudaError();
int mpiErr = MPI_Allreduce(MPI_IN_PLACE,yHost,n*2,MPI_Type(yHost),MPI_SUM,comm);
if(mpiErr != MPI_SUCCESS) PLEGMA_error("MPI_Allreduce failed with error %d\n", mpiErr);
Expand All @@ -245,7 +246,7 @@ namespace cuBLAS{
inline void gemv(OPER_MATR_BLAS trans, int m, int n, Float alpha[2], Float* A, Float* x, Float beta[2], Float* y, MPI_Comm comm){
Float yHost[n*2];
cuBLAS::gemv(trans,m, n, alpha, A, x, beta, y, yHost,comm);
cudaMemcpy(y,yHost,sizeof(yHost),cudaMemcpyHostToDevice);
qudaMemcpy(y,yHost,sizeof(yHost),qudaMemcpyHostToDevice);
checkQudaError();
}
}
Expand Down
73 changes: 67 additions & 6 deletions include/PLEGMA_Correlator.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace plegma {

// forward declaration
template<typename Float> class PLEGMA_Vector;
template<typename Float> class PLEGMA_Vector3D;
template<typename Float> class PLEGMA_Propagator;
template<typename Float> class PLEGMA_Propagator3D;
template<typename Float> class PLEGMA_Fmunu;
Expand Down Expand Up @@ -191,6 +192,21 @@ namespace plegma {
std::vector<std::string> d = {s};
setGroups(d);
}
void contractEigVecs(Float *ptr, int nvecs, size_t vec_size, bool dev_ptr);

void contractPropEigVecs(PLEGMA_Propagator<Float> &prop1, Float *spinVals,
Float *ptr, int nvecs, size_t vec_size, bool dev_ptr);

void contractPropEigVecsClosed(PLEGMA_Propagator<Float> &prop1, Float *spinVals,
Float *ptr, int nvecs, size_t vec_size, bool dev_ptr);

void contractLoop(PLEGMA_Vector3D<Float> &vec,
PLEGMA_Propagator3D<Float> &prop);

void contractLoopSIB(PLEGMA_Vector3D<Float> &vec,
PLEGMA_Propagator3D<Float> &prop);


void contractMesons(PLEGMA_Propagator<Float> &prop1,
PLEGMA_Propagator<Float> &prop2);

Expand All @@ -201,6 +217,47 @@ namespace plegma {

void contractMesonsNew(PLEGMA_Propagator<Float> &prop1,
PLEGMA_Propagator<Float> &prop2);

void contractMesonsOpen(PLEGMA_Propagator<Float> &prop1,
PLEGMA_Propagator<Float> &prop2,
bool all_cols=true);

void contractMesons1ps(PLEGMA_Propagator<Float> &prop1,
PLEGMA_Propagator<Float> &prop2,
PLEGMA_Gauge<Float> &gauge,
bool all_cols=true);

void contractMesonsSIB(PLEGMA_Propagator<Float> &prop1,
PLEGMA_Propagator<Float> &prop2);

void contractMesonsOpenSIB(PLEGMA_Propagator<Float> &prop1,
PLEGMA_Propagator<Float> &prop2);

void contractMesonsSIR(PLEGMA_Propagator<Float> &prop1,
PLEGMA_Propagator<Float> &prop2);

void contractMesonsOpenSIR(PLEGMA_Propagator<Float> &prop1,
PLEGMA_Propagator<Float> &prop2);

void contractMesonsOpenDefl(PLEGMA_Propagator<Float> &prop1,
PLEGMA_Propagator<Float> &prop2);

void contractMesons1psSIB(PLEGMA_Propagator<Float> &prop1,
PLEGMA_Propagator<Float> &prop2,
PLEGMA_Gauge<Float> &gauge);

void contractMesonsLIBE(PLEGMA_Propagator<Float> &prop1,
PLEGMA_Propagator<Float> &prop2);

void contractMesonsOpenLIBE(PLEGMA_Propagator<Float> &prop1,
PLEGMA_Propagator<Float> &prop2);

void contractMesons1psLIBE(PLEGMA_Propagator<Float> &prop1,
PLEGMA_Propagator<Float> &prop2,
PLEGMA_Gauge<Float> &gauge);



void contractMesonsAll(PLEGMA_Propagator<Float> &prop1,
PLEGMA_Propagator<Float> &prop2);

Expand All @@ -211,13 +268,17 @@ namespace plegma {
PLEGMA_Propagator<Float> &prop2,
PLEGMA_Propagator<Float> &prop3,
PLEGMA_Propagator<Float> &prop4);


void contractBaryonsEEE(Float *ptr, Float* evs, int nvecs, size_t vec_size, bool dev_ptr);


void contractBaryonsUDSC(PLEGMA_Propagator<Float> &propUP,
PLEGMA_Propagator<Float> &propDN,
PLEGMA_Propagator<Float> &propST,
PLEGMA_Propagator<Float> &propCH,
bool only_st=false, bool only_ch=false);

PLEGMA_Propagator<Float> &propDN,
PLEGMA_Propagator<Float> &propST,
PLEGMA_Propagator<Float> &propCH,
bool only_up = false, bool only_dn = false,
bool only_st = false, bool only_ch = false, bool excludeHeavyOnly = false);

template<typename Float2>
void contractTetraquarks(PLEGMA_Propagator<Float2> &propLT,
PLEGMA_Propagator<Float2> &propST,
Expand Down
18 changes: 18 additions & 0 deletions include/PLEGMA_Field.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ namespace plegma {
size_t ghost_length; /*!< Member variable to hold the size of ghosts that involve in the communication (only side ghosts) */
size_t ghost_corner_length; /*!< Member variable to hold the size of ghosts that involve in the communication (ghosts which are on the corners) */
size_t ghost_vertex_length;
size_t single_ghost_length;
size_t single_corner_length;

Float *h_elem; /*!< Member variable pointer to the elements of the field on CPU */
Float *d_elem; /*!< Member variable pointer to the elements of the field on GPU */
Float *d_ext_ghost;
Float *h_ext_ghost_r; /*!< Member variable pointer to the side ghost elements of the field on CPU (receive version)*/
Float *h_ext_ghost_s; /*!< Member variable pointer to the side ghost elements of the field on CPU (send version)*/
Float *h_ext_ghost_corner_r; /*!< Member variable pointer to the corner ghost elements of the field on CPU (receive version)*/
Expand Down Expand Up @@ -72,6 +75,7 @@ namespace plegma {
@param field_l: see "field_length"
@param vol_l: see "total_length"
*/

void initialize(ALLOCATION_FLAG alloc_flag, int field_l, size_t vol_l);
public:
/**
Expand Down Expand Up @@ -126,6 +130,8 @@ namespace plegma {
* @return a pointer to access device elements of the field
*/
Float* D_elem() const { return d_elem; }
void D_elem(Float* ptr) { d_elem = ptr; }

/**
* @return a boolean if the host memory is allocated
*/
Expand All @@ -134,6 +140,7 @@ namespace plegma {
* @return a boolean if the device memory is allocated
*/
bool IsAllocDevice() const { return isAllocDevice;}

/**
* @return the kind of allocation we have for the field
*/
Expand All @@ -151,8 +158,11 @@ namespace plegma {
* @return the length of the ghost part of the field in lattice points (local)
*/
size_t Ghost_length() const { return ghost_length;} // the length of the ghost
size_t SingleGhost_length() const { return single_ghost_length;} // the length of a single ghost
size_t GhostCorner_length() const { return ghost_corner_length;} // the length of the ghost for corners
size_t SingleCorner_length() const { return single_corner_length;} // the length of a single ghost for corners
size_t GhostVertex_length() const { return ghost_vertex_length;} // the length of the ghost for vertex
size_t TotalGhost_length() const { return Ghost_length()+GhostCorner_length()+GhostVertex_length();}
/**
* @return the length of the field + ghost in lattice points (local)
*/
Expand All @@ -162,9 +172,12 @@ namespace plegma {
* @return the bytes the length of the field including d.o.f
*/
size_t Bytes_total() const { return this->Total_length()*this->Field_length()*2*sizeof(Float); }
size_t Bytes_total_ghost() const { return this->TotalGhost_length()*this->Field_length()*2*sizeof(Float); }
/**
* @return the bytes the length of the ghost including d.o.f
*/
size_t Bytes_singleghost() const { return this->SingleGhost_length()*this->Field_length()*2*sizeof(Float); }
size_t Bytes_singleCorner() const { return this->SingleCorner_length()*this->Field_length()*2*sizeof(Float); }
size_t Bytes_ghost() const { return this->Ghost_length()*this->Field_length()*2*sizeof(Float); }
size_t Bytes_ghostCorner() const { return this->GhostCorner_length()*this->Field_length()*2*sizeof(Float); }
size_t Bytes_ghostVertex() const { return this->GhostVertex_length()*this->Field_length()*2*sizeof(Float); }
Expand Down Expand Up @@ -207,11 +220,16 @@ namespace plegma {
* @param dirOr: choose the dir,orien. If negative does all dir, orien. If >=0 then (0,1,2,3,4,5,6,7,8) -> (+x,+y,+z,+t,-x,-y,-z,-t)
*/
void communicateSideGhost(short dir=-1, ORIENTATION sign=DIR_BOTH, ACTION action=DO_ALL);
void communicateSecondSideGhost(short dir=-1, ORIENTATION sign=DIR_BOTH, ACTION action=DO_ALL);
void communicateThirdSideGhost(short dir=-1, ORIENTATION sign=DIR_BOTH, ACTION action=DO_ALL);

/**
* @brief Communicates side+corner ghosts in chosen direction,orientation
* @param dirOr: choose the dir,orien. If negative does all dir, orien. If >=0 then (0,1,2,3,4,5,6,7,8) -> (+x,+y,+z,+t,-x,-y,-z,-t)
*/
void communicateCornerGhost(short dir=-1, ORIENTATION sign=DIR_BOTH, ACTION action=DO_ALL);
void communicateSecondCornerGhost(short dir=-1, ORIENTATION sign=DIR_BOTH, ACTION action=DO_ALL);

void communicateVertexGhost(short dir=-1, ORIENTATION sign=DIR_BOTH, ACTION action=DO_ALL);
/**
* @brief Communicates side or side+corner ghosts in chosen direction,orientation give the ghost type
Expand Down
3 changes: 3 additions & 0 deletions include/PLEGMA_Gauge.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <PLEGMA_Field.h>
#include <PLEGMA_GaugeU1.h>
#include "complex"

#ifndef _PLEGMA_GAUGE_H
Expand Down Expand Up @@ -120,6 +121,8 @@ namespace plegma {
**/
void gluonField(PLEGMA_Gauge<Float> &uIn);
void U3xU1(PLEGMA_Gauge<Float> &u3, PLEGMA_U1Gauge<Float> &u1);
void mul_dag(PLEGMA_Gauge<Float> &uIn);
void qedPhase(PLEGMA_GaugeU1<Float> &uIn, Float phase);
};

/////////////////////////////////////
Expand Down
40 changes: 40 additions & 0 deletions include/PLEGMA_GaugeU1.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include <PLEGMA_Field.h>
#include "complex"

#ifndef _PLEGMA_GAUGEU1_H
#define _PLEGMA_GAUGEU1_H

namespace plegma {
template<typename Float> class PLEGMA_Su3field;
////////////////////////
// CLASS: PLEGMA_GaugeU1 //
////////////////////////

template<typename Float>
class PLEGMA_GaugeU1 : virtual public PLEGMA_Field<Float> {
public:
PLEGMA_GaugeU1(ALLOCATION_FLAG alloc_flag=BOTH, GHOST_FLAG ghost_flag=FIRST_CORNER);
~PLEGMA_GaugeU1(){;}
Float calculatePlaq(Float phase);
/*
void absorbDir_device(PLEGMA_Su3field<Float> &su,int dir);
void absorbDir_host(PLEGMA_Su3field<Float> &su,int dir);


//PLEGMA_topocharge.cuh
Float calculateTopo(TOPO_CHARGE_DEF charge_def);

//PLEGMA_WFlow.cuh
void GFlow_step( PLEGMA_GaugeU1<Float> &Z, double eps );
void applyGradientFlow( PLEGMA_GaugeU1<Float> &Z, int N, double eps);
void unitarize();

void scaleDirWise(std::complex<Float> scale[N_DIMS]);
void momPhase(Float phase[N_DIMS],int mom[N_DIMS]);
void gFixingLandau(PLEGMA_GaugeU1<Float> &uIn,Float overelaxPar=0.2,Float tolerance=1.0e-12,int maxIter=10000, int seedOverRelax=123456);
void gluonField(PLEGMA_GaugeU1<Float> &uIn);
*/
};
}

#endif
35 changes: 35 additions & 0 deletions include/PLEGMA_Propagator.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <PLEGMA_Field.h>
#include <color_spinor_field.h>

#ifndef _PLEGMA_PROPAGATOR_H
#define _PLEGMA_PROPAGATOR_H
Expand All @@ -17,6 +18,10 @@ namespace plegma {
public:
PLEGMA_Propagator(ALLOCATION_FLAG alloc_flag=BOTH, GHOST_FLAG ghost_flag=FIRST_SIDE);
~PLEGMA_Propagator(){;}

void copyToQUDA( std::vector<ColorSpinorField>& cudaVector, bool isEv = false);
void copyFromQUDA( std::vector<ColorSpinorField>& cudaVector, bool isEv = false);


void apply_gamma(GAMMAS gMat, LEFTRIGHT LR = LEFT);
void apply_gamma5();
Expand Down Expand Up @@ -53,6 +58,36 @@ namespace plegma {
@return void
**/
void absorb(PLEGMA_Vector3D<Float> &vec, int global_it, int nu, int c2);

/**
@brief Applies N times Gaussian(Wuppertal) smearing operator on all time-slices of a vector. NOTE: works also for Vector3D
@param PLEGMA_Vector<Float> &vecIn, The 4D input vector (Exchange of boundaries happens inside the function)
@param PLEGMA_Gauge<Float> &gauge, The gauge field that will be used in the Gaussian smearing operator (Exchange of boundaries happens inside the function)
@param int nsmearGauss, The number of times to apply the operator (if zero copies inVec to outVec)
@param Float alphaGauss, alpha parameter of the Gaussian smearing
**/

void gaussianSmearing(PLEGMA_Propagator<Float> &propIn, PLEGMA_Gauge<Float> &gauge, int nsmearGauss, Float alphaGauss);


/**
@brief packing the sinktime slice in all other time slices
@param the initial propagator to be broadcasted
@param PLEGMA_Propagator<Float> in initial propagator to be broadcasted
@param int sinktimeslice the sinktime slice to be broadcasted
**/
void pack_propagator_as_sink(PLEGMA_Propagator<Float> &in, int sinktimeslice, int max_source_sink_separations, bool initial);

/**
@brief packing the sinktime slice in all other time slices
@param the initial propagator to be broadcasted
@param PLEGMA_Propagator<Float> in initial propagator to be broadcasted
@param int sinktimeslice the sinktime slice to be broadcasted
**/
void pack_propagator_from_source_to_sink(PLEGMA_Propagator<Float> &in, int sinktimeslice, int source_sink_separations, bool initial);




void applyBoundaries_device(int t0);
void rotateToPhysicalBase_host(int sign);
Expand Down
Loading