!-------------------------------------- LICENCE BEGIN ------------------------------------
!Environment Canada - Atmospheric Science and Technology License/Disclaimer, 
!                     version 3; Last Modified: May 7, 2008.
!This is free but copyrighted software; you can use/redistribute/modify it under the terms 
!of the Environment Canada - Atmospheric Science and Technology License/Disclaimer 
!version 3 or (at your option) any later version that should be found at: 
!http://collaboration.cmc.ec.gc.ca/science/rpn.comm/license.html 
!
!This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
!without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
!See the above mentioned License/Disclaimer for more details.
!You should have received a copy of the License/Disclaimer along with this software; 
!if not, you can write to: EC-RPN COMM Group, 2121 TransCanada, suite 500, Dorval (Quebec), 
!CANADA, H9P 1J3; or send e-mail to service.rpn@ec.gc.ca
!-------------------------------------- LICENCE END --------------------------------------
#if defined (DOC)
*
***comdeck ptopo.cdk
*
*______________________________________________________________________
*                                                                      |
*  VARIABLES ASSOCIATED WITH LOGICAL PARALLEL PROCESSOR TOPOLOGY       |
*                                                                      |
*     along Y                                                          |
*        .           .                    .                            |
*        .           .                    .                            |
*   +-----------+-----------+     +---------------+                    |
*   | (0,myrow) | (1,myrow) |.....| (mycol,myrow) |.....               |
*   +-----------+-----------+     +---------------+                    |
*        .           .                    .                            |
*        .           .                    .                            |
*   +-----------+-----------+     +---------------+                    |
*   |   (0,2)   |   (1,2)   |.....|   (mycol,2)   |.....               |
*   +-----------+-----------+     +---------------+                    |
*   |   (0,1)   |   (1,1)   |.....|   (mycol,1)   |.....               |
*   +-----------+-----------+     +---------------+                    |
*   |   (0,0)   |   (1,0)   |.....|   (mycol,0)   |..... along X       |
*   +-----------+-----------+     +---------------+                    |
*______________________________________________________________________|
*                    |                                                 |
* NAME               | DESCRIPTION                                     |
*--------------------|-------------------------------------------------|
* Ptopo_myproc       | local processor number (zero based numbering)   |
*                    | 0,1,2 ... (Ptopo_npex * Ptopo_npey -1)          |
* Ptopo_myrow        | local row    number in processor topology       |
* Ptopo_mycol        | local column number in processor topology       |
* Ptopo_numproc      | total number of processors used                 |
* Ptopo_npex         | number of processors along X                    |
* Ptopo_npey         | number of processors along Y                    |
* Ptopo_npeOpenMP    | number of processors requested for OpenMp       |
* Ptopo_smtphy       | number of threads for the physics               |
* Ptopo_smtdyn       | number of threads for the dynamics              !
* Ptopo_bind_L       | TRUE for binding, FALSE for no binding          |
* Ptopo_nblocx       | number of blocks along X                        |
* Ptopo_nblocy       | number of blocks along Y                        |
*                    | 0,1,2 ... (Ptopo_nblocx * Ptopo_nblocy-1)       |
* Ptopo_mybloc       | bloc number after block topology                |
* Ptopo_gindx        | contains global indices that represents:        |
*                    | (1,*)-the minimum I indices on each local PE    |
*                    | (2,*)-the maximum I indices on each local PE    |
*                    | (3,*)-the minimum J indices on each local PE    |
*                    | (4,*)-the maximum J indices on each local PE    |
*                    | (5,*)-the minimum K indices on each local PE    |
*                    | (6,*)-the maximum K indices on each local PE    |
*----------------------------------------------------------------------
*
*
#endif
      integer 
     $        Ptopo_myproc    , Ptopo_myrow, Ptopo_mycol ,
     $        Ptopo_numproc   , Ptopo_npex , Ptopo_npey  ,
     $        Ptopo_npeOpenMP , Ptopo_npeOpenMP_resv     , 
     $        Ptopo_nblocx    , Ptopo_nblocy,Ptopo_mybloc,
     $        Ptopo_myblocx   , Ptopo_myblocy, Ptopo_blocme,
     $        Ptopo_numpe_perb, Ptopo_smtphy , Ptopo_smtdyn
      logical Ptopo_bind_L
      
      DCL_DYNVAR(Ptopo, gindx, integer, (6,*))
*
      MARK_COMMON_BEG(Ptopo_i)
      common  / Ptopo_i /
     $        Ptopo_myproc    , Ptopo_myrow, Ptopo_mycol ,
     $        Ptopo_numproc   , Ptopo_npex , Ptopo_npey  ,
     $        Ptopo_npeOpenMP , Ptopo_npeOpenMP_resv     , 
     $        Ptopo_nblocx    , Ptopo_nblocy,Ptopo_mybloc,
     $        Ptopo_myblocx   , Ptopo_myblocy, Ptopo_blocme,
     $        Ptopo_numpe_perb, Ptopo_smtphy , Ptopo_smtdyn,
     $        Ptopo_bind_L
      MARK_COMMON_END(Ptopo_i)
*
      namelist /ptopo/
     $     Ptopo_npex  , Ptopo_npey  , Ptopo_nblocx, Ptopo_nblocy, 
     $     Ptopo_smtphy, Ptopo_smtdyn, Ptopo_bind_L