Re: [AMBER] OpenMP programs

From: Ross Walker <>
Date: Thu, 8 Jul 2010 12:23:04 -0700

Hi Marc,

> I'm installing Amber 11 and AmberTools 1.4 on our systems using
> gcc-4.1.2. I'm wondering which tools utilize the OPENMP directives.
> I have grep'd for OPENMP in the source code, but it looks like the
> majority (once compiled) are libraries that are linked in. As far as
> I can tell, only 'nab' and 'sander' utilize openmp. Did I miss any?

It really is only nab which uses openMP. What is inside sander is
experimental and should not be enabled for production code.
> A couple further questions.
> 1 - Do these programs honour the OMP_NUM_THREADS environment variable?
> Must this be set by way of static variable before compilation?

Yes NAB should. OMP_NUM_THREADS is a runtime variable so it doesn't matter
what it is set to at compilation. Under most Linux's I believe it defaults
to the number of cores on your machine if you do not explicitly set it.

> 2 - Does MPI and OPENMP play nice together? That is, do the algorithms
> understand running MPI between compute nodes and openmp within nodes?

As far as I know the two are mutually exclusive in the case of NAB. I.e. you
can either have parallelization with MPI or you can have it with openMP but
not with both. Sander technically supports it but as I say it is largely
experimental so I would just avoid this.

> For example: run 32 threads, across 4 nodes. So, 8 openmp threads per
> node with MPI communication across the 4 nodes.

This is one of those things that always looks great on paper but if you try
to implement it in a real code it is a complete disaster hence why it is not
done in AMBER.

> 3 - To compile with openmp I need to add the '-openmp' directive to
> ./configure. Does it qualify as 'parallel' in Amber? I would consider
> it parallel, but how do the configuration and compilation see it?

Yes, you specify this on the configure line. Consider -openmp and -mpi to be
mutually exclusive here.

All the best

|\oss Walker

| Assistant Research Professor |
| San Diego Supercomputer Center |
| Tel: +1 858 822 0854 | EMail:- |
| | |

Note: Electronic Mail is not secure, has no guarantee of delivery, may not
be read every day, and should not be used for urgent or sensitive issues.

AMBER mailing list
Received on Thu Jul 08 2010 - 12:30:03 PDT
Custom Search