set_process_affinity_mask problem - Python 2.5 gcc 4.3.2 (Ubuntu4.3.2-1ubuntu12)

I

Isaac Gouy

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.
 
A

Aahz

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.
[...]
Please suggest what I can do to debug / fix this problem.

Search the Ubuntu bugs first, then ask on an Ubuntu mailing list. My
impression is that 8.10 is a bit half-baked -- I'm rather annoyed that
the feature "save session on logout" is completely b0rked, but it's not
so annoying that I'll downgrade.
--
Aahz ([email protected]) <*> http://www.pythoncraft.com/

"Programming language design is not a rational science. Most reasoning
about it is at best rationalization of gut feelings, and at worst plain
wrong." --GvR, python-ideas, 2009-3-1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,144
Latest member
KetoBaseReviews
Top