[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [modeller_usage] Parallel modeller



Well, updating to the last version 9.7 I get one step further, but still
in trouble (see bellow the log message). I also attach my script, which
runs without problem in serial mode.

------- SCRIPT -----------------
from modeller import *
from modeller.automodel import *
from modeller.parallel import *

# Use 3 CPUs in a parallel job on this machine
j = job()
j.append(local_slave())
j.append(local_slave())
j.append(local_slave())

log.verbose()
env = environ()

# Create a new class based on 'loopmodel' so that we can redefine
# select_loop_atoms
class MyLoop(loopmodel):
    # This routine picks the residues to be refined by loop modeling
    def select_loop_atoms(self):
        # Two residue ranges (both will be refined simultaneously)
        return selection(
#                 self.residue_range('39:', '46:'),
                 self.residue_range('67:', '74:'),
#                 self.residue_range('116:', '123:'),
                         self.residue_range('141:', '170:'),
#                         self.residue_range('214:', '228:'),
                         self.residue_range('246:', '257:'))
                        
##################################
    def special_patches(self, aln):
    self.patch(residue_type='DISU',
                   residues=(self.residues['77:'],
                             self.residues['157:']))
env.io.atom_files_directory = ['.', '..']
env.edat.nonbonded_sel_atoms = 1

a = MyLoop(env,
           inimodel='NPY2_on3eml.B99990010.pdb',
       sequence='NPY2_on3eml_loop',
           loop_assess_methods=assess.DOPEHR) # assess each loop with DOPE

a.loop.starting_model = 1           # First loop model
a.loop.ending_model   = 10           # Last loop model
a.loop.md_level = refine.slow_large # loop refinement method
a.use_parallel_job(j)               # Use the job for model building
a.make()                            # do modeling and loop refinement
--------------- END OF SCRIPT ------------
--------------- ERROR ------------------

<< end of ENERGY.
openf___224_> Open           NPY2_on3eml_loop.IL00000001.pdb
wrpdb___568_> Residues, atoms, selected atoms:      301     2398     2398
Running 10 tasks on 3 slaves
/usr/bin/python2.5 /usr/lib/modeller9v7/bin/modslave.py -slave
127.0.0.2:11760:0:YWJRYYUV >& loopmodel.slave0
/usr/bin/python2.5 /usr/lib/modeller9v7/bin/modslave.py -slave
127.0.0.2:11760:1:DHUJSEJZ >& loopmodel.slave1
/usr/bin/python2.5 /usr/lib/modeller9v7/bin/modslave.py -slave
127.0.0.2:11760:2:BMUFRHVN >& loopmodel.slave2
Identified slave <Slave on localhost>
Identified slave <Slave on localhost>
Identified slave <Slave on localhost>
Traceback (most recent call last):
  File "loopmodel.py", line 45, in <module>
    a.make()                            # do modeling and loop refinement
  File
"/usr/lib64/python2.5/site-packages/modeller/automodel/loopmodel.py",
line 31, in make
    self.build_seq(self.inimodel, 1)
  File
"/usr/lib64/python2.5/site-packages/modeller/automodel/loopmodel.py",
line 143, in build_seq
    self.parallel_loop_models(atmsel, ini_model, num, sched)
  File
"/usr/lib64/python2.5/site-packages/modeller/automodel/loopmodel.py",
line 161, in parallel_loop_models
    self.loop.outputs.extend(job.run_all_tasks())
  File "/usr/lib64/python2.5/site-packages/modeller/parallel/job.py",
line 127, in run_all_tasks
    for task in self._finish_all_tasks():
  File "/usr/lib64/python2.5/site-packages/modeller/parallel/job.py",
line 160, in _finish_all_tasks
    task = self._process_event(obj, s)
  File "/usr/lib64/python2.5/site-packages/modeller/parallel/job.py",
line 176, in _process_event
    task = obj.task_results()
  File "/usr/lib64/python2.5/site-packages/modeller/parallel/slave.py",
line 61, in task_results
    r = self.get_data(allow_heartbeat=True)
  File
"/usr/lib64/python2.5/site-packages/modeller/parallel/communicator.py",
line 84, in get_data
    (cmdtype, obj) = self._recv()
  File
"/usr/lib64/python2.5/site-packages/modeller/parallel/communicator.py",
line 125, in _recv
    raise RemoteError(obj.exc, self)
modeller.parallel.communicator.RemoteError: <type 'AttributeError'>:
'module' object has no attribute 'MyLoop' from <Slave on localhost>

----------------- END OF ERROR ----------------
Modeller Caretaker wrote:
> On 10/09/2009 04:31 AM, Hugo Gutiérrez de Teran wrote:
>> I want to run parallel job on my Quadcore. I used as a template the
>> script provided in the examples/automodel/model-parallel.py
> ...
>> ImportError: No module named socket
>
> Did you read http://salilab.org/modeller/FAQ.html#19 ?
>
>     Ben Webb, Modeller Caretaker


-- 
Hugo G. de Teran, PhD.
"Parga Pondal" Research fellow
Fundación Pública Galega de Medicina Xenómica - SERGAS
Santiago de Compostela (SPAIN) 

Phone +34 981563100 ext 13873
e-mail:       http://web.usc.es/~hugogdt