[MITgcm-support] OpenMP and multithreading

Dimitris Menemenlis menemenlis at sbcglobal.net
Wed Oct 17 20:22:28 EDT 2007


Paola, the total size of the domain is Nx*Ny where

      &           Nx  = sNx*nSx*nPx,
      &           Ny  = sNy*nSy*nPy,

nPx*nPy is the total number of (MPI) processes,
nSx*nSy is the total number of tiles per process, and
sNx*sNy is the dimension of each tile.

For shared-memory threaded code each one of the nSx*nSy tiles will
be handled by a different thread.  If nSx*nSy=1, then you will have
only one thread per MPI process.

Some words of caution:

1) shared-memory threaded code is not as well supported as MPI code, especially 
in the packages where careless programmers (like myself) sometimes 
(accidentally) introduce constructs that break the threading.

2) with some exceptions there is very little gain in using threaded code vs MPI 
code, even on shared memory platforms.  For example on the SGI origin and altix 
we typically use MPI rather than threaded code, even though they are shared 
memory platforms.

D.

-- 
Dimitris Menemenlis <menemenlis at sbcglobal.net>
5056 Oakwood Ave, La Canada, CA 91011-2450
tel/fax: 818-790-6735;   cell: 818-625-6498



More information about the MITgcm-support mailing list