24 id[0] = -(
slong)(np+10+3*comm->
id);
25 for(i=0;i<
np;++
i)
id[i+1] = -(
sint)(i+1);
26 id[np+1] = comm->
id+1;
27 id[np+2] = comm->
id+1;
28 id[np+3] = np-comm->
id;
32 for(i=0;i<np+4;++
i) v[i] = 1;
33 gs(v,
dom,gs_add,0,gsh,0);
34 if(comm->
id==0)
for(i=0;i<np+4;++
i) printf(
"%g\n",v[i]);
35 if(comm->
id==0) printf(
"\n");
36 for(i=0;i<np+4;++
i) v[i] = 1;
37 gs(v,
dom,gs_add,1,gsh,0);
38 if(comm->
id==0)
for(i=0;i<np+4;++
i) printf(
"%g\n",v[i]);
44 int main(
int narg,
char *arg[])
51 world = MPI_COMM_WORLD;
52 MPI_Comm_size(world,&np);
#define tmalloc(type, count)
int main(int narg, char *arg[])
static void comm_free(struct comm *c)
static void test(const struct comm *comm)
Gather/Scatter Library interface.
establishes some macros to establish naming conventions
static void comm_init(struct comm *c, comm_ext ce)