From: Volz, Bill (WRVO) (WRVO++at++chevron.com)
Date: 03/14/2000 16:02:34
Sorry for this not being a performer question, but I can't find an answer on
the developer's page and can't figure out where else to post.
I've got an OpenGL program that has a section that is not graphics dependant
but is a heavy cpu burner. I've noticed from gr_osview, that without
threads, there appears to be an idle cpu on my 2 cpu onyx2. To make use of
the cpu, I'd like to use threads. Then no threads are in use the critical
section runs at a rate of about 1 second/iteration. When I use one thread it
runs at a rate of about .88 second/iteration. But when I go to two threads I
get different behavior. Sometimes it runs in .88 seconds/iteration, other
times in about .55 seconds/iteration. There is no change in the program, I
just restart. When it runs in the fast way, both cpu's are busy, when in the
slow mode only one appears to be active.
Can someone explain what this means, and how I can ensure that both cpu's
are used? I'm not using pthread_setrunon_np, due to portability concerns.
pthread_getrunon_cp returns cpu 0 in all cases.
Thanks,
William R Volz - Senior Research Geophysicist
Chevron Petroleum Technology
Voice: 281-596-2059 Fax: 281-596-3009
This archive was generated by hypermail 2b29 : Tue Mar 14 2000 - 16:16:54 PST