------- Comment #8 from rrpeter at sandia dot gov 2008-10-13 15:17 ------- Subject: Re: OpenMP thinks that I have 1 processor on an 8 processor pc
jakub at gcc dot gnu dot org wrote: > ------- Comment #7 from jakub at gcc dot gnu dot org 2008-10-13 09:43 ------- > sched_getaffinity(3502, 128, { ff, 0, 0, 0 }) = 32 > .... > sched_getaffinity(3502, 128, { 1, 0, 0, 0 }) = 32 > ... > sched_getaffinity(3502, 128, { 1, 0, 0, 0 }) = 32 > Shows that the process originally was bound to any of the 8 CPUs (mask 0xff), > but > after a while it got confined only to the first CPU. The question is what > has done that. You can look for sched_setaffinity syscall in the strace dump, > then either from the surrounding syscalls or under debugger find out where > sched_setaffinity or pthread_setaffinity_np functions have been called from > or if the program invokes the syscall directly, without calling a > libc/libpthread function. > > > -- > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37586 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > > Hi Jakub, I did as you asked and get: sched_setaffinity(24094, 128, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }) = 0 Its buried in other "startup" code: ................... NOTE: usg::Scene using usg default data file path list path = .:/usr/local/share/OpenSceneGraph/data:/usr/local/share/OpenSceneGraph/data/Env:/usr/local/share/OpenSceneGraph/data/fonts:/usr/local/share/OpenSceneGraph/data/Images:/usr/share/OpenSceneGraph/data:/usr/share/OpenSceneGraph/data/Env:/usr/share/OpenSceneGraph/data/fonts:/usr/share/OpenSceneGraph/data/Images camera number: 0 sched_setaffinity(24094, 128, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }) = 0 INFO> navigation mode set to umbra Warning: font file "fonts/arial.ttf" not found. Setting savConfigCB to '::guiWrapper saveConfig' sLoadFile filename:/home/vision_data/geometry_objects/test.cdf fileType: lineRowCnt=-1 lineColCnt=-1 std::string UmbModCDFDataSet::LoadFile(const s...... ................................... I suppose that this means that something in Tcl, OpenScenegraph, umbra, my own rwm is setting the following software to run on only one processor. I ran a strace -f to get a full "dump" and found that it occurs between 2 "open(library)" calls. I backtracked to OpenSceneGraph to find one possibility: [EMAIL PROTECTED] src]$ pwd /usr/local/src/OpenSceneGraph-2.4.0/src [EMAIL PROTECTED] src]$ find . -exec grep -n -H sched_setaffinity {} \; ./OpenThreads/pthreads/CMakeLists.txt:73: sched_setaffinity( 0, sizeof(cpumask), &cpumask ); ./OpenThreads/pthreads/CMakeLists.txt:83: sched_setaffinity( 0, &cpumask ); ./OpenThreads/pthreads/PThread.c++:135: sched_setaffinity( 0, sizeof(cpumask), &cpumask ); ./OpenThreads/pthreads/PThread.c++:137: sched_setaffinity( 0, &cpumask ); ./OpenThreads/pthreads/PThread.c++:549: sched_setaffinity( 0, sizeof(cpumask), &cpumask ); ./OpenThreads/pthreads/PThread.c++:551: sched_setaffinity( 0, &cpumask ); ./OpenThreads/pthreads/PThread.c++:984: sched_setaffinity( 0, sizeof(cpumask), &cpumask ); ./OpenThreads/pthreads/PThread.c++:986: sched_setaffinity( 0, &cpumask ); ./OpenThreads/pthreads/GNUmakefile:43:ifeq ($(COMPILE_USING_TWO_PARAM_sched_setaffinity),yes) ./OpenThreads/pthreads/GNUmakefile:44:DEF += -DCOMPILE_USING_TWO_PARAM_sched_setaffinity [EMAIL PROTECTED] src]$ This looks like a possibility for the source of my problem or not? Can I make my own call to sched_setaffinity? There is, of course, always the possibility of causing problems. Ralph -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37586