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

Re: [IMP-dev] Parallelize code



On 07/16/2014 02:11 AM, Davide Baù wrote:
I have set up a Brownian dynamics optimizer as follow:

m = IMP.kernel.Model()

# Brownian Dynamics
bd=IMP.atom.BrownianDynamics(m)
bd.set_maximum_time_step(1000)

for i in range(1, nrounds):
      e = bd.optimize(10)

Is it possible in IMP to parallelize the code to make it faster?

If you really require the output of one optimization to be the input of the next, then no, short of parallelizing the restraint evaluation itself. Currently the only way to do that is via OpenMP.

If you can instead run nrounds optimizations starting from different (e.g. random) starting conditions, parallelization is trivial. You can use IMP.parallel or simply run multiple copies of your script, e.g. with different random seeds.

	Ben
--
                      http://salilab.org/~ben/
"It is a capital mistake to theorize before one has data."
	- Sir Arthur Conan Doyle