mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Bug fix with spreadout FFT
This commit is contained in:
parent
a9ec5cf564
commit
fddeb29d6b
@ -230,6 +230,7 @@ namespace Grid {
|
|||||||
// Barrel shift and collect global pencil
|
// Barrel shift and collect global pencil
|
||||||
std::vector<int> lcoor(Nd), gcoor(Nd);
|
std::vector<int> lcoor(Nd), gcoor(Nd);
|
||||||
result = source;
|
result = source;
|
||||||
|
int pc = processor_coor[dim];
|
||||||
for(int p=0;p<processors[dim];p++) {
|
for(int p=0;p<processors[dim];p++) {
|
||||||
PARALLEL_REGION
|
PARALLEL_REGION
|
||||||
{
|
{
|
||||||
@ -240,7 +241,8 @@ namespace Grid {
|
|||||||
for(int idx=0;idx<sgrid->lSites();idx++) {
|
for(int idx=0;idx<sgrid->lSites();idx++) {
|
||||||
sgrid->LocalIndexToLocalCoor(idx,cbuf);
|
sgrid->LocalIndexToLocalCoor(idx,cbuf);
|
||||||
peekLocalSite(s,result,cbuf);
|
peekLocalSite(s,result,cbuf);
|
||||||
cbuf[dim]+=p*L;
|
cbuf[dim]+=((pc+p) % processors[dim])*L;
|
||||||
|
// cbuf[dim]+=p*L;
|
||||||
pokeLocalSite(s,pgbuf,cbuf);
|
pokeLocalSite(s,pgbuf,cbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -278,7 +280,6 @@ namespace Grid {
|
|||||||
flops+= flops_call*NN;
|
flops+= flops_call*NN;
|
||||||
|
|
||||||
// writing out result
|
// writing out result
|
||||||
int pc = processor_coor[dim];
|
|
||||||
PARALLEL_REGION
|
PARALLEL_REGION
|
||||||
{
|
{
|
||||||
std::vector<int> clbuf(Nd), cgbuf(Nd);
|
std::vector<int> clbuf(Nd), cgbuf(Nd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user