On Thu, Jun 25, 2009, Kaushik Raha wrote:
>
> I have been trying to compile and run NAB programs in parallel using MPI,
> without much success. I went through the archives and there is just one
> thread which did not solve my problem. Going by the NAB manual I complied
> nab for parallel execution by:
> -- configure_at -mpi (in the amber10/src dir)
> -- make -f makefile_at
>
> the compilation goes through. then I am trying to compile an MPI NAB
> program. At this point I am a little confused. The NAB documentation
> suggests that mpiinit() and mpifinalize() calls need to be in the nab code,
> but a post in the thread suggests that it is not neccessary. could anybody
> clarify this?
mpiinit() and mpifinalize() are not required -- this was an error in the
printed version of the manual (from lulu.com), but is fixed in the
documentation in AmberTools version 1.2.
>
> I tried both. when I don't include mpi calls in the nab code, I am unable to
> run the program. when I include mpi calls in the body of the code then it
> seems to run. however, seems like it is running the same program n times (n
> being the number of proccessors). for example, all the messages from nab
> energy routines are printed n times. and there is no speed up.
First, I'm not clear which version of NAB you are using, and would recommend
upgrading to AmberTools 1.2 if you are not already doing that. (Your
description makes me think you are not running the current version.)
Second, I agree that the documentation for MPI is pretty sparse, and assumes
you understand how MPI coding works. The mpirun program will indeed spawn off
multiple copies of the same job. Division of work among processors is
controlled by the mytaskid variable, or the get_mytaskid() function. So,
there is no automatic parallelization -- the -mpi option just assists you to
in writing MPI programs.
However, the nab energy routines *are* written for MPI, and I am surprised by
the behavior you report, that messages from the nab energy routines are
repeated n times. The code only prints energy results when get_mytaskid() ==
0 (see sff.c or eff.c). The codes in amber10/test/nab (such as gbrna.nab)
should work without modification with MPI, and should show speedups (although
they are so short that you might not see it; see the programs in
amber10/benchmarks/nab for longer examples).
....hope this helps....dac
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Jul 06 2009 - 11:21:21 PDT