aboat mutilthread!

Moderator: BarsMonster

Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
LEDAEX
Posts: 15
Joined: Sat Aug 08, 2009 3:37 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

aboat mutilthread!

Post by LEDAEX » Mon Aug 31, 2009 2:09 am

there is as much as four nvidia gpus in my computer.but when i used cuda to programe on it .there is only one gpu runned.i no it would be use mutilthread to use more than one gpu. then i used createthhread to start 3 threads,and use setpriorityclass to set these thread as realtime . but then my computer runned so slowly that i can not do anything .
follow this is one part of my code/

Code: Select all

for (int i = 0;i<deviceount;i++)
	{
		threadhandle[i]= CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)GpuThread,this,CREATE_SUSPENDED ,&id);
		SetThreadIdealProcessor(threadhandle[i],i*2);
		SetThreadPriority(threadhandle[i],THREAD_PRIORITY_TIME_CRITICAL);
		ResumeThread(threadhandle[i]);
 	}
can any one help me how to solve this problem?
thx

shifter1
Posts: 19
Joined: Thu Mar 19, 2009 2:08 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: aboat mutilthread!

Post by shifter1 » Mon Aug 31, 2009 1:16 pm

Do you have SLI enabled?

LEDAEX
Posts: 15
Joined: Sat Aug 08, 2009 3:37 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: aboat mutilthread!

Post by LEDAEX » Tue Sep 01, 2009 1:04 am

en when i used barswf to runned md5 crack.it worked well and so i want to know why i am not

protter
Posts: 20
Joined: Tue Dec 23, 2008 10:03 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: aboat mutilthread!

Post by protter » Tue Sep 01, 2009 4:42 pm

LEDAEX wrote:

Code: Select all

for (int i = 0;i<deviceount;i++)
	{
		threadhandle[i]= CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)GpuThread,this,CREATE_SUSPENDED ,&id);
		SetThreadIdealProcessor(threadhandle[i],i*2);
		SetThreadPriority(threadhandle[i],THREAD_PRIORITY_TIME_CRITICAL);
		ResumeThread(threadhandle[i]);
 	}
Probably using of THREAD_PRIORITY_TIME_CRITICAL is a bad idea for your computer. Try to use THREAD_PRIORITY_ABOVE_NORMAL

Sc00bz
Posts: 136
Joined: Fri Oct 03, 2008 8:28 am
Contact:

Re: aboat mutilthread!

Post by Sc00bz » Tue Sep 01, 2009 5:55 pm

protter wrote:
LEDAEX wrote:

Code: Select all

for (int i = 0;i<deviceount;i++)
	{
		threadhandle[i]= CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)GpuThread,this,CREATE_SUSPENDED ,&id);
		SetThreadIdealProcessor(threadhandle[i],i*2);
		SetThreadPriority(threadhandle[i],THREAD_PRIORITY_TIME_CRITICAL);
		ResumeThread(threadhandle[i]);
 	}
Probably using of THREAD_PRIORITY_TIME_CRITICAL is a bad idea for your computer. Try to use THREAD_PRIORITY_ABOVE_NORMAL
It's not as bad as you think because those threads wait for long periods of time followed by very short execution time. I would go with THREAD_PRIORITY_ABOVE_NORMAL or THREAD_PRIORITY_HIGHEST because you really don't need THREAD_PRIORITY_TIME_CRITICAL.

LEDAEX
Posts: 15
Joined: Sat Aug 08, 2009 3:37 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: aboat mutilthread!

Post by LEDAEX » Wed Sep 02, 2009 7:08 am

because on these threads i will call gpu kernel . and it may cost aboat 0.02seconds as normal. but when i test these timer, i found some threads put out aboat 0.5seconds. 25timers of normal and when i call 3 gpus ,it is slowest than only one gpu .so i think it may be some wrong on call these threads.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 1 guest