Révision 239 Pi/XPU/PiXpuMPI.py
| PiXpuMPI.py (revision 239) | ||
|---|---|---|
| 73 | 73 |
Fit=False |
| 74 | 74 |
# Marsaglia RNG |
| 75 | 75 |
RNG='MWC' |
| 76 |
# Seeds |
|
| 77 |
Seeds=110271,101008 |
|
| 76 | 78 |
# Value type : INT32, INT64, FP32, FP64 |
| 77 | 79 |
ValueType='FP32' |
| 78 | 80 |
# Inside based on If |
| ... | ... | |
| 251 | 253 |
for Device in Devices[1:]: |
| 252 | 254 |
print("Send to device %i on rank %i" % (Device,r))
|
| 253 | 255 |
InputCL['Device']=Device |
| 256 |
DeltaD=Device-min(Devices)+r+1 |
|
| 257 |
DeltaS=(DeltaD-1+r)*524287 |
|
| 258 |
InputCL['Seeds']=numpy.uint32(Seeds[0]*DeltaD+DeltaS),numpy.uint32(Seeds[1]*DeltaD+DeltaS) |
|
| 254 | 259 |
comm.send('CONTINUE',dest=r,tag=11)
|
| 255 | 260 |
comm.send(InputCL,dest=r,tag=11) |
| 256 | 261 |
r+=1 |
| 257 | 262 |
|
| 258 | 263 |
# Compute on rank 0 |
| 259 | 264 |
print("Compute on rank 0")
|
| 265 |
DeltaD=Device-min(Devices)+1 |
|
| 266 |
DeltaS=(DeltaD-1)*524287 |
|
| 267 |
InputCL['Seeds']=numpy.uint32(Seeds[0]*DeltaD+DeltaS),numpy.uint32(Seeds[1]*DeltaD+DeltaS) |
|
| 260 | 268 |
InputCL['Device']=Devices[0] |
| 261 | 269 |
|
| 262 | 270 |
if GpuStyle=='CUDA': |
Formats disponibles : Unified diff