/* COARRAY tests -- test 1 Using GASnet: http://gasnet.cs.berkeley.edu/ Compile as: gcc -g -I ../gasnet-inst/include -I../gasnet-inst/include/smp-conduit/ \ test.c -L ../gasnet-inst/lib -lgasnet-smp-par -lpthread Run as: ./a.out [] NOTE: For some reason this only gives one image; I probably do something wrong; presumably more in running GASnet than in the actual library routines. */ #include #define GASNET_PAR /* Any of: GASNET_PAR, GASNET_PARSYNC, GASNET_SEQ. */ #include int main (int argc, char **argv) { int res; res = gasnet_init (&argc, &argv); if (res != GASNET_OK) printf ("ERROR (%d) when calling gasnet_init\n", res); printf("Running %d of %d\n", gasnet_mynode () + 1, gasnet_nodes ()); gasnet_attach (NULL, 0, gasnet_getMaxLocalSegmentSize(), GASNET_PAGESIZE); if (res != GASNET_OK) printf ("ERROR (%d) when calling gasnet_attach\n", res); printf("Running %d of %d\n", gasnet_mynode () + 1, gasnet_nodes ()); gasnet_exit (0); /* This node. */ }