For a couple of months, I've been successfully using the Python 
set_process_affinity_mask wrapper from 

http://pypi.python.org/pypi/affinity/0.1.0


Now I've upgraded from Ubuntu 8.04 to Ubuntu 8.10 (from gcc 4.2.3 to gcc 4.3.2) 
and set_process_affinity_mask seems to fail on the x86 Ubuntu install.
It still works fine, after upgrade, on the x64 Ubuntu install.


I've tried re-installing Python, and the affinity package, and gcc, and glibc, 
and ... without getting it to work.


Specifically, I have a function

         def setAffinity():
            if affinitymask:
               set_process_affinity_mask(os.getpid(),affinitymask)

which is passed to a spawned process

p = Popen(commandline,...,preexec_fn=setAffinity)


Reducing setAffinity() to os.getpid() lets the program run without failure, 
trying to get_process_affinity_mask or set_process_affinity_mask gives

ERROR 22 Invalid argument


Please suggest what I can do to debug / fix this problem.



      
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to