
Rules_OMP

ABINIT style for OpenMP programming

Copyright (C) 2001-2009 ABINIT group (XG)
This file is distributed under the terms of the
GNU General Public License, see ~abinit/COPYING
or http://www.gnu.org/copyleft/gpl.txt .
For the initials of contributors, see ~abinit/doc/developers/contributors.txt .

=====================================================================

The following sections are covered :
0. Basics
1. Portability
2. Efficiency

=====================================================================

0. Basics

0.a. Information about OpenMP can be found at the following URL :
- (to be completed)

---------------------------------------------------------------------

1. Portability

1.a. (IBM) named constants are not permitted in SHARED clause.

Examples :

 integer, parameter :: mfac=11
!$OMP PARALLEL DO SHARED(mfac)      ! not accepted : mfac in a parameter
 ...

or

!$OMP PARALLEL DO SHARED(two_pi)    ! not accepted : two_pi is a parameter
                                    ! defined in basis_defs


1.b. Do not forget the continuation sign &

Examples :

incorrect version ...

!$OMP PARALLEL DO DEFAULT(PRIVATE)                  ! the continuation sign & is missing
!$OMP&SHARED(aft,bef,gbound,g3max,ic,ind,len3,lot)

correct version ...

!$OMP PARALLEL DO DEFAULT(PRIVATE)&                 ! the continuation sign & is present
!$OMP&SHARED(aft,bef,gbound,g3max,ic,ind,len3,lot)

---------------------------------------------------------------------

2. Efficiency

(to be completed)


