CULA on one cpu core?

General discussion for CULA. Use this forum for questions, examples, feedback, and feature requests.

CULA on one cpu core?

Postby ikku100 » Fri Sep 06, 2013 1:34 am

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).
ikku100
 
Posts: 4
Joined: Mon Jun 18, 2012 6:45 am

Re: CULA on one cpu core?

Postby john » Fri Sep 06, 2013 6:06 am

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?

Postby ikku100 » Mon Sep 09, 2013 1:28 am

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?
ikku100
 
Posts: 4
Joined: Mon Jun 18, 2012 6:45 am

Re: CULA on one cpu core?

Postby john » Wed Sep 11, 2013 8:39 am

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?

Postby ikku100 » Thu Sep 12, 2013 1:55 am

Ok, I will create my own implementation then. Thanks for the clear answers.
ikku100
 
Posts: 4
Joined: Mon Jun 18, 2012 6:45 am


Return to General CULA Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron