3
* This is to test GA_Create (is a collective operation)
4
* GA_Create -- used to create a global array using handles like 'g_A'
5
* Here used GA_Inquire to verify that g_A hanle returns the right values of created_array
20
void create_ga(int ndim, int datatypes)
23
int dims[MAX_DIM], i, val=4;
25
for(i=0; i<ndim; i++) dims[i]=SIZE;
27
g_A = NGA_Create(datatypes, ndim, dims, "array_A", NULL);
30
GA_Error("GA Error: no global array exists \n", ndim);
34
main(int argc, char **argv)
36
int rank, nprocs, i, j;
37
// int datatypes[NUM_TYPES] = {C_INT, C_DBL, C_LONG};
39
MPI_Init(&argc, &argv);
41
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
42
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
44
//MA_init(C_INT, 1000, 1000);
47
for(i=1; i<=MAX_DIM; i++)
49
for(j=0; j<NUM_TYPES; j++)
50
create_ga(i, TYPES[j]);
60
* TO-DO : assign SIZE to a bigger value