def parallel_task():
    me = ga.pgroup_nodeid()
    nproc = ga.pgroup_nnodes()
    if not me:
        print "This is process 0 on group %s" % ga.pgroup_get_default()
    g_a = ga.create(ga.C_DBL, (3,4,5))
    ga.randomize(g_a)
    if me == 0:
        print np.sum(ga.access(g_a))
Esempio n. 2
0
def parallel_task():
    me = ga.pgroup_nodeid()
    nproc = ga.pgroup_nnodes()
    if not me:
        print "This is process 0 on group %s" % ga.pgroup_get_default()
    g_a = ga.create(ga.C_DBL, (3, 4, 5))
    ga.randomize(g_a)
    if me == 0:
        print np.sum(ga.access(g_a))
Esempio n. 3
0
def me():
    return ga.pgroup_nodeid(ga.pgroup_get_default())
Esempio n. 4
0
def parallel_task():
    me = ga.pgroup_nodeid()
    nproc = ga.pgroup_nnodes()
    ### print a message from the master of the group
    g_a = ga.create(ga.C_DBL, (3,4,5))
    ga.randomize(g_a)
Esempio n. 5
0
def me():
    return ga.pgroup_nodeid(ga.pgroup_get_default())