Пример #1
0
    # mpiSize = input('How many processes do you want to open: ')
    # nodesName = ranw_input('Please input the node name you will use: ')
    begNum = 900      # number
    endNum =  5000    # number
    readPre = ''       # string
    readPost = '.tar'      # string
    srcPath = 'G:\\sulei\\13004\\test\\'        # string
    dstPath = 'G:\\sulei\\13004\\test\\'
    terminateFlag = None
#    flf.printLostFile(begNum, endNum, srcPath, readPre, readPost)
    eA = flf.getAvailSerial(begNum, endNum, srcPath, readPre, readPost)
    if eA == None:
        print "There is no file to dispose."
        terminateFlag = 1
    else:
        uA = aN.alloNum(mpiSize, eA)  
      
        for i in range(len(uA)):
            if i == 0:
                sA = uA[i]
            else:
                comm.send(uA[i],dest=i,tag=77)
      
else:
    sA = None
    readPre = None
    readPost = None
    srcPath = None
    dstPath = None
    terminateFlag = None
Пример #2
0
    dst = "G:\\sulei\\workplace\\montage\\test\\"
    writePre = "mon_"
    writePost = ".tif"
    begNum = 1902  #input("Please input begin num\n")
    endNum = 1902  # input("Please input end num\n")
    xBeg = 40  # input("xBeg:\n")
    xEnd = 57  # input("xEnd:\n")
    yBeg = 31  # input("yBeg:\n")
    yEnd = 60  # input("yEnd:\n")
    isReverse = 1  # input("is reverse?1:0\n")

    eA = flf.getAvailSerial(begNum, endNum, src, '', '')
    if eA == None:
        print "There is no file to dispose."
        exit()
    uA = aN.alloNum(mpiSize, eA)

    for i in range(len(uA)):
        if i == 0:
            sA = uA[i]
        else:
            comm.send(uA[i], dest=i, tag=77)

else:
    sA = comm.recv(source=0, tag=77)
    src = None
    dst = None
    readPre = None
    readPost = None
    writePre = None
    writePost = None