Processing power of Igor
james.brooks-2
I have a question about how much of the CPU that Igor can use. I am struggling to find concrete answers as to whether you can make Igor have permission/be able to use more of the CPU. I am running code for large datasets and Igor only is utilizing 10% of the CPU, and up to only 6GB or so of the RAM (32GB total available).
Is there any options to force Igor to use more of the power available in my computer? It is frustrating that's all not being able to tap into the capability of the device.
You might find a solution by looking at the Help file below
August 16, 2018 at 09:20 am - Permalink
What Igor version?
August 16, 2018 at 01:21 pm - Permalink
It depends very much on what you are doing, but are you aware of the MultiThread keyword for wave assignments (see above)? Also, in many cases the use of MatrixOP will speed things up, e.g.:
variable n
variable timer
make/O/D/N=(n,n) aa, bb
MultiThread aa = p+1
timer = StartMSTimer
bb = sqrt(aa)
Printf "Normal wave assigment: %g s\r", StopMSTimer(timer)/1e6
timer = StartMSTimer
MultiThread bb = sqrt(aa)
Printf "MultiThread wave assigment: %g s\r", StopMSTimer(timer)/1e6
timer = StartMSTimer
MatrixOP/O bb = sqrt(aa)
Printf "Assignment using MatrixOP: %g s\r", StopMSTimer(timer)/1e6
// EDIT: MatrixOP is most efficient, when it can work on layers
Make/O/D/N=(n,1,n) aa
MultiThread aa = r+1
timer = StartMSTimer
MatrixOP/O/NTHR=0 bb = sqrt(aa)
Printf "Assignment using MatrixOP and working on layers: %g s\r", StopMSTimer(timer)/1e6
end
Gives on my computer
August 16, 2018 at 11:24 pm - Permalink
Pretty much as mentioned above, try to use multithread for assignment, try to use MatrixOp for operations involving wave, and maybe FastOp for wave multiplication by a scaler.
Assuming you are using the verison 7 or 8 of Igor Pro, you can also try "multithreadingControl setmode = 8". This works for me sometimes when the concerning functions involve only for-loop or so.
To ensure your functions can be multithreaded, you can also try to make thread-safe function. (this I am not familiar with however).
Finally, if you can cast your operations all in the form of Matrices, you may be able to use GPU to accelerate the operations.
Some time ago I wrote an XOP with OpenCL to use AMD CPU with Igor for SGEMM, even with very naive kernel you can get 3-6 times (~600-1000 GFLOPs) of speed-up.
August 17, 2018 at 07:53 am - Permalink