This srcalt is intended for medium dataset. It is not needed for large dataset. 

There are quite a few ranks invalid for 129.tera_tf with mref dataset. 
In source code  TF_GENDATA.f90, it specified how the decomposition is done 
at each ranks counts up to 8192 ranks. For example, in the following two lines, 
it stats that the decomposition of 432-449 ranks will be 9x6x8 blocks. For rank 
counts 433-449, it will just run with 432 ranks with all other ranks idle. 

  9, 6, 8, 1, &   ! 432
        68*0,      &   ! 433- 449
 
However, total number of cells is 240x240x240 with mref. So number of cells per 
block will be 240/8=30, 240/6=40 and 240/9=26.66. 240 is not divisible by 9. So 
we got error message "The number of blocks is not a divisor of the number of cells”. 

With lref, the number of cells is 720x720X720. So the last dimension is 720/9=80. 
So lref can run at 448 ranks without any problem. 

For mref, if there is a “9” in the decomposition, the corresponding ranks are invalid. 
As a results the following are invalid ranks:

270-287
324-359
432-449
450-479
486-499
540-599
648-719
810-863
864-899
900-959
972-999
1080-1151
1296-1349
1350-1439
1620-1727

This srcalt replaces the invalid mapping with valid ones, if possible. For ranks that 
alternative mapping is not available, it will drop to the highest valid ranks.  The fix covers 
1 to 1000 ranks as there is little chance mref will be tested with higher than 1000 ranks. 

Here is the diffs:
diff TF_GENDATA.f90 TF_GENDATA.f90.original

157c157
<       15, 6, 3, 1, &   ! 270
---
>        9, 5, 6, 1, &   ! 270

165c165
<        9, 6, 6, 0, &   ! 324
---
>        9, 6, 6, 1, &   ! 324

173c173
<       12, 6, 6, 1, &   ! 432
---
>        9, 6, 8, 1, &   ! 432

175c175
<       15, 5, 6, 1, &   ! 450
---
>       10, 5, 9, 1, &   ! 450

179c179
<        9, 6, 9, 0, &   ! 486
---
>        9, 6, 9, 1, &   ! 486

185c185
<       15, 6, 6, 1, &   ! 540
---
>       10, 6, 9, 1, &   ! 540

187c187
<       12, 8, 6, 1, &   ! 576
---
>        9, 8, 8, 1, &   ! 576

193c193
<        9, 8, 9, 0, &   ! 648
---
>        9, 8, 9, 1, &   ! 648

203c203
<       10, 9, 9, 0, &   ! 810
---
>       10, 9, 9, 1, &   ! 810

205c205
<       12,12, 6, 1, &   ! 864
---
>       12, 8, 9, 1, &   ! 864

207c207
<       15, 6,10, 1, &   ! 900
---
>       10, 9,10, 1, &   ! 900

211c211
<       12, 9, 9, 0, &   ! 972
---
>       12, 9, 9, 1, &   ! 972

