[RegCNET] In parallel run, how to control the GRID

bixq bixq at ictp.it
Mon Apr 27 17:41:27 CEST 2009


Well, you need consider the order of CPU.

1. make sure the following line is in the subroutine you want to apply
       include 'mpiregcm.h'

2. then calculate
       jj = j+myid*jxp     ! j is the parallel j number
                           ! myid is the sequence of CPU
                           ! jxp is   mjx/NCPU

3. add your codes besed on jj.

4. You'd better have a check to make sure you can get exactly the same
    result between serial and parallel run.

Regards,

On Mon, 27 Apr 2009, congc84 wrote:

>
>
> Dear all;
>     When the RegCM is running in parallel way, the domain is divided according to the x grid number:
>     1 2 3 4 +++ 5 6 7 8 +++ 9 10 11 12
>     If I want to change a variable (for example heart) based on 3456, I could use if(i>3&i<6) in serial run.
> But in parallel run, they are cut into 3 blocks, and their subscripts are all 1-4. So I want to ask help on how I can only modify 3 4 5 6 grid value in parallel way. (the 4 grid belong two different blocks)
>    May be controling the CPU number is a feasible way, but I don't familiar with MPI so much.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Dr. Xunqiang Bi         email:bixq at ictp.it
   Earth System Physics Group
   The Abdus Salam ICTP
   Strada Costiera, 11
   P.O. BOX 586, 34100 Trieste, ITALY
   Tel: +39-040-2240302  Fax: +39-040-2240449
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the RegCNET mailing list