Grid 0.7.0
Communicator_base.cc
Go to the documentation of this file.
1/*************************************************************************************
2
3 Grid physics library, www.github.com/paboyle/Grid
4
5 Source file: ./lib/communicator/Communicator_none.cc
6
7 Copyright (C) 2015
8
9Author: Peter Boyle <paboyle@ph.ed.ac.uk>
10
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License along
22 with this program; if not, write to the Free Software Foundation, Inc.,
23 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24
25 See the full license in the file "LICENSE" in the top level distribution directory
26*************************************************************************************/
27/* END LEGAL */
28#include <Grid/GridCore.h>
29#include <fcntl.h>
30#include <unistd.h>
31#include <limits.h>
32#include <sys/mman.h>
33
35
37
39// Info that is setup once and indept of cartesian layout
44
46// Grid information queries
50int CartesianCommunicator::BossRank(void) { return 0; };
55
57// very VERY rarely (Log, serial RNG) we need world without a grid
59
60#ifdef USE_GRID_REDUCTION
69#else
71{
72 GlobalSumVector((float *)&c,2);
73}
75{
76 GlobalSumVector((double *)&c,2);
77}
78#endif
80{
81 GlobalSumVector((float *)c,2*N);
82}
84{
85 GlobalSumVector((double *)c,2*N);
86}
87
89
90
bool Stencil_force_mpi
AcceleratorVector< int, MaxDims > Coordinate
Definition Coordinate.h:95
#define NAMESPACE_BEGIN(A)
Definition Namespace.h:35
#define NAMESPACE_END(A)
Definition Namespace.h:36
std::complex< RealF > ComplexF
Definition Simd.h:78
std::complex< RealD > ComplexD
Definition Simd.h:79
static CommunicatorPolicy_t CommunicatorPolicy
const Coordinate & ThisProcessorCoor(void)
void GlobalSumVector(RealF *, int N)
const Coordinate & ProcessorGrid(void)