Révision 190 Pi/XPU/PiXpuMPI.py
PiXpuMPI.py (revision 190) | ||
---|---|---|
75 | 75 |
RNG='MWC' |
76 | 76 |
# Value type : INT32, INT64, FP32, FP64 |
77 | 77 |
ValueType='FP32' |
78 |
|
|
79 |
HowToUse='%s -c (Print Curves) -d <DeviceId> -g <CUDA/OpenCL> -i <Iterations> -b <BlocksBegin> -e <BlocksEnd> -s <BlocksStep> -f <ThreadsFirst> -l <ThreadsLast> -t <ThreadssTep> -r <RedoToImproveStats> -m <SHR3/CONG/MWC/KISS> -v <INT32/INT64/FP32/FP64>' |
|
78 |
# Inside based on If |
|
79 |
IfThen=False |
|
80 |
|
|
81 |
HowToUse='%s -c (Print Curves) -k (Case On IfThen) -d <DeviceId> -g <CUDA/OpenCL> -i <Iterations> -b <BlocksBegin> -e <BlocksEnd> -s <BlocksStep> -f <ThreadsFirst> -l <ThreadsLast> -t <ThreadssTep> -r <RedoToImproveStats> -m <SHR3/CONG/MWC/KISS> -v <INT32/INT64/FP32/FP64>' |
|
80 | 82 |
|
81 | 83 |
try: |
82 |
opts, args = getopt.getopt(sys.argv[1:],"hcg:i:b:e:s:f:l:t:r:d:m:v:",["gpustyle=","iterations=","blocksBegin=","blocksEnd=","blocksStep=","threadsFirst=","threadsLast=","threadssTep=","redo=","device=","marsaglia=","valuetype="]) |
|
84 |
opts, args = getopt.getopt(sys.argv[1:],"hckg:i:b:e:s:f:l:t:r:d:m:v:",["gpustyle=","iterations=","blocksBegin=","blocksEnd=","blocksStep=","threadsFirst=","threadsLast=","threadssTep=","redo=","device=","marsaglia=","valuetype="])
|
|
83 | 85 |
except getopt.GetoptError: |
84 | 86 |
print(HowToUse % sys.argv[0]) |
85 | 87 |
sys.exit(2) |
... | ... | |
124 | 126 |
|
125 | 127 |
elif opt == '-c': |
126 | 128 |
Curves=True |
129 |
elif opt == '-k': |
|
130 |
IfThen=True |
|
127 | 131 |
elif opt in ("-d", "--device"): |
128 | 132 |
Devices.append(int(arg)) |
129 | 133 |
elif opt in ("-g", "--gpustyle"): |
... | ... | |
240 | 244 |
InputCL['RNG']=RNG |
241 | 245 |
InputCL['ValueType']=ValueType |
242 | 246 |
InputCL['GpuStyle']=GpuStyle |
247 |
InputCL['IfThen']=IfThen |
|
243 | 248 |
|
244 | 249 |
for Device in Devices[1:]: |
245 | 250 |
print("Send to device %i on rank %i" % (Device,r)) |
Formats disponibles : Unified diff