CULA on one cpu core?
5 posts
• Page 1 of 1
CULA on one cpu core?
When using culaDeviceSgels cula seems to use all available cpu cores which is fine as long as the cpu is fast and fully available. As I run my processes in batches, 4 at a time on one computer, each having access to only one cpu core (the others are used by yet other processes), each having its own gpu, the cpu vs gpu compute power ratio is rather low.
The result is a program that is taking over 1 minute to do a bunch of regressions instead of seconds (I am afraid cula is using multi-threading on a single core, for some reason, causing context switches to slow down everything). In any case, it is only cpu power slowing down the computations.
I understand cula is a hybrid library and as I read optimized for a multi-cpu, single gpu setup. Would it be possible to configure it or recompile in such a way that mostly the gpu is used?
Ps. I am using linux, the problem occurs with cula dense R14 and R15, the systems have 6 cores and use hyperthreading, gpu is mostly idle during computation (according to nvidia-smi).
The result is a program that is taking over 1 minute to do a bunch of regressions instead of seconds (I am afraid cula is using multi-threading on a single core, for some reason, causing context switches to slow down everything). In any case, it is only cpu power slowing down the computations.
I understand cula is a hybrid library and as I read optimized for a multi-cpu, single gpu setup. Would it be possible to configure it or recompile in such a way that mostly the gpu is used?
Ps. I am using linux, the problem occurs with cula dense R14 and R15, the systems have 6 cores and use hyperthreading, gpu is mostly idle during computation (according to nvidia-smi).
- ikku100
- Posts: 4
- Joined: Mon Jun 18, 2012 6:45 am
Re: CULA on one cpu core?
CULA will respect the OMP_NUM_THREADS environment variable since it uses OpenMP internally. You can just set that to 1.
- john
- Administrator
- Posts: 587
- Joined: Thu Jul 23, 2009 2:31 pm
Re: CULA on one cpu core?
Thank you, that at least takes away my fear that CULA might multithread on one CPU. The problem remains though: it is probably expecting a much faster CPU than it has because it can only utilize 1 core out of the 12 available (because the others are used for other tasks).
So, in short, is there a way to tell CULA to rely mostly on GPU power and refrain from using the CPU for most calculations?
So, in short, is there a way to tell CULA to rely mostly on GPU power and refrain from using the CPU for most calculations?
- ikku100
- Posts: 4
- Joined: Mon Jun 18, 2012 6:45 am
Re: CULA on one cpu core?
There is not. CULA needs the CPU power for some operations.
- john
- Administrator
- Posts: 587
- Joined: Thu Jul 23, 2009 2:31 pm
Re: CULA on one cpu core?
Ok, I will create my own implementation then. Thanks for the clear answers.
- ikku100
- Posts: 4
- Joined: Mon Jun 18, 2012 6:45 am
5 posts
• Page 1 of 1
Return to General CULA Discussion
Who is online
Users browsing this forum: No registered users and 1 guest