/* $Source: runtime/gasnet/other/testspawn/testspawn.c $ * $Date: Tue, 19 Apr 2005 02:00:38 -0700 $ * $Revision: 1.3 $ * Description: * Copyright 2005, Regents of the University of California * Terms of use are as specified in license.txt */ #include #include #include #define gasneti_bootstrapInit _CONCAT(gasneti_bootstrapInit_,SPAWNER) #define gasneti_bootstrapFini _CONCAT(gasneti_bootstrapFini_,SPAWNER) #define gasneti_bootstrapAbort _CONCAT(gasneti_bootstrapAbort_,SPAWNER) #define gasneti_bootstrapBarrier _CONCAT(gasneti_bootstrapBarrier_,SPAWNER) #define gasneti_bootstrapExchange _CONCAT(gasneti_bootstrapExchange_,SPAWNER) #define gasneti_bootstrapAlltoall _CONCAT(gasneti_bootstrapAlltoall_,SPAWNER) #define gasneti_bootstrapBroadcast _CONCAT(gasneti_bootstrapBroadcast_,SPAWNER) int main(int argc, char **argv) { gasnet_node_t *array1, *array2; gasnet_node_t i, j; gasneti_bootstrapInit(&argc, &argv, &gasneti_nodes, &gasneti_mynode); gasneti_bootstrapBarrier(); array1 = gasneti_calloc(gasneti_nodes, sizeof(gasnet_node_t)); array2 = gasneti_calloc(gasneti_nodes, sizeof(gasnet_node_t)); printf("Hello from node %d of %d\n", (int)gasneti_mynode, (int)gasneti_nodes); fflush(stdout); /* Test bootstrapBroadcast */ gasneti_bootstrapBarrier(); if (!gasneti_mynode) { printf("Testing bootstrapBroadcast()...\n"); fflush(stdout); } for (i=0; i