next up previous
Next: About this document ... Up: hw3 Previous: The Library Structure

Message Passing

In order to check if the message passing was working fine, each grid point was initialized with it's lexicographic value. Thus the numbering was from 1 - nx*ny. For this case nx=ny=10 was chosen and the message passing was done for 2*2 processors. As can be seen from the following, the message passing is working fine. The ghost cells which correspond to the boundary are not getting altered (as there is no communication there) and the ghost cells which come due to the partitioning, are updated.

Before performing the sends and receives

      0   0   0   0   0            0   0   0   0   0
  0  91  92  93  94  95   0    0  96  97  98  99  100  0
  0  81  82  83  84  85   0    0  86  87  88  89  90   0
  0  71  72  73  74  75   0    0  76  77  78  79  80   0
  0  61  62  63  64  65   0    0  66  67  68  69  70   0
  0  51  52  53  54  55   0    0  56  57  58  59  60   0
      0   0   0   0   0            0   0   0   0   0

      0   0   0   0   0            0   0   0   0   0
  0  41  42  43  44  45   0    0  46  47  48  49  50   0
  0  31  32  33  34  35   0    0  36  37  38  39  40   0
  0  21  22  23  24  25   0    0  26  27  28  29  30   0
  0  11  12  13  14  15   0    0  16  17  18  19  20   0
  0   1   2   3   4   5   0    0   6   7   8   9  10   0
      0   0   0   0   0            0   0   0   0   0
After performing the sends and receives
      0   0   0   0   0	               0   0   0   0   0
  0  91  92  93  94  95   96  	   95  96  97  98  99  100  0
  0  81  82  83  84  85   86      85  86  87  88  89  90   0
  0  71  72  73  74  75   76      75  76  77  78  79  80   0
  0  61  62  63  64  65   66      65  66  67  68  69  70   0
  0  51  52  53  54  55   56      55  56  57  58  59  60   0
     41  42  43  44  45               46  47  48  49  50   0

     51  52  53  54  55               56  57  58  59  60
  0  41  42  43  44  45  46       45  46  47  48  49  50   0
  0  31  32  33  34  35  36       35  36  37  38  39  40   0
  0  21  22  23  24  25  26       25  26  27  28  29  30   0
  0  11  12  13  14  15  16       15  16  17  18  19  20   0
  0   1   2   3   4   5   6        5   6   7   8   9  10   0
      0   0   0   0   0                0   0   0   0   0


Anirudh Modi
2000-03-21