Ignore:
Timestamp:
Feb 24, 2012 3:12:00 PM (10 years ago)
Author:
vondreele
Message:

making 1st multiprocess version of GSAS-II

Location:
MPbranch
Files:
2 copied

Legend:

Unmodified
Added
Removed
  • MPbranch/GSASIIstruct.py

    r495 r496  
    26752675    if MaxProcess > 1:
    26762676        mpPool = mp.Pool(processes=MaxProcess)
    2677         results = mpPool.map(ComputePowderHessian,argList)
    2678         for Vec,Hess in results:
     2677        #results = mpPool.map(ComputePowderHessian,argList)
     2678        #for Vec,Hess in results:
     2679        for Vec,Hess in mpPool.imap_unordered(ComputePowderHessian,argList):
    26792680            VecSum += Vec
    26802681            HessSum += Hess
     
    27652766    if MaxProcess > 1:
    27662767        mpPool = mp.Pool(processes=MaxProcess)
    2767         results = mpPool.map(ComputePowderProfile,argList)
    2768         for arg,res in zip(argList,results):
     2768        #results = mpPool.map(ComputePowderProfile,argList)
     2769        #for arg,res in zip(argList,results):
     2770        #results = mpPool.map(ComputePowderProfile,argList)
     2771        #for i,res in enumerate(results):
     2772        for i,res in enumerate(
     2773            mpPool.imap_unordered(ComputePowderProfile,argList)
     2774            ):
     2775            print 'process',i
    27692776            xB,xF,ycSect,ybSect,RL = res
    2770             Histogram = arg[0]
     2777            Histogram = argList[i][0]
    27712778            Histogram['Reflection Lists'] = RL
    27722779            x,y,w,yc,yb,yd = Histogram['Data']
Note: See TracChangeset for help on using the changeset viewer.