[MMTK] mpi minimization

Lars Skjærven larsss at gmail.com
Tue Oct 21 11:47:11 UTC 2008

Dear MMTK users,

I want to perform an all-atom normal mode calculation with MMTK. For that
reason I need to perform a minimization which takes some time on a single
CPU. I therefore tried to build MMTK with the MPI module of Scientific
python in the hope of running on several CPU's. The installation went fine,
and I can successfully run the MPI example that is attached with MMTK. I
then built my own MPI minimization script. It works fine, except that I get
no speed-up. I would try to get a speed up of the MPI example, but I guess
the system is too small to get a speed-up on more CPU's. I guess whats
happening is that I run 4 identical jobs instead of one job in parallel...
:-(  Details about the versions used, and the script is attached below.

Any tips are highly appreciated.

Best regards,
Lars Skjaerven
University of Bergen, Norway

Execute the script:
mpirun -n 4 mpipython mpi_minimization.py

The following versions were used:
openmpi 1.3
Python 2.5.2
Numeric 23.8.2
netcdf 3.6.2
Scientific python 2.6.2
MMTK 2.4.10 (built with mpipython)

The following minimization script was used:
if world.rank == 0:
    universe = InfiniteUniverse(Amber94ForceField())
    universe.protein = Protein(pdbfile)
    save(universe, 'mpi.setup')

universe = load('mpi.setup')

# Minimize
minimizer = SteepestDescentMinimizer(universe,
                                     mpi_communicator = world )

if world.rank == 0:
    output_actions = [StandardLogOutput(10)]
    # Nothing for the other processors
    output_actions = []

minimizer( convergence = 1.e-3, steps = 1000, actions=output_actions )

if world.rank == 0:
    print "Total time elapsed: " + str(b-a)

# Synchronize
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://starship.python.net/pipermail/mmtk/attachments/20081021/e4e608d6/attachment.htm>

More information about the mmtk mailing list