# test some aspects of the parallel scheduling mechanism # # exit=0 comm = xplor.p_comm open("testParallel-proc-%d.tmp"%comm.procNum,"w").write("ok") procNums = comm.collect("%d"%comm.procNum) print procNums if procNums != ['0','1']: print 'proc nums invalid:', procNums exit=1 pass msg = comm.distribute("yummy") if msg=='yummy': open("testParallel-proc-%d-dist.tmp"%comm.procNum,"w").write("ok") pass if comm.procNum==1: import sys sys.exit(0) pass procNums = comm.barrier() if procNums != [0]: print 'proc nums invalid:', procNums exit=-1 else: open("testParallel-proc-%d-end.tmp"%comm.procNum,"w").write("ok") pass import sys sys.exit(exit)