On 1/12/10 7:58 AM, leuven wrote: > I try to use multiple cpu with modeller, but it fails, here is my srcipts: > > # Example of changing the default optmization schedule > from modeller import * > from modeller.automodel import * > from modeller.parallel import * # Load the parallel class, to use > multiple processors > j = job("/usr/lib/modeller9v7/bin/modslave.py") > j.append(local_slave()) # 1 Processor > j.append(local_slave()) # 2 Processors
Leave out the argument to the job() constructor - it is not necessary in recent versions of Modeller.
> And here is the error: > > /soft/python/lib/python2.5/site-packages/modeller/__init__.py:69: > RuntimeWarning: Python C API version mismatch for module _modeller: This > Python has API version 1013, module _modeller has version 1012. > import _modeller
Probably what is happening is that you are running the master Python script using the 'mod9v7' script, but the slave is being run using your system Python, and the two don't match. If you use mod9v7 to run the master, you must use it for the slaves too; if you run the master using regular Python, you must also use regular Python for the slaves. But if you simply leave out the argument to job() above in Modeller 9v7, it should automatically detect which is the correct one to use.
Ben Webb, Modeller Caretaker