Ravi,
Forget my earlier e-mail. Sorry - I messed up.
The only problem with your code is you have transposed two for loops.
The code should read:
if(myrank == 0)
for(k=0;k<thk;k++)
//move for(j=0;j<ln;j++)
for(i=0;i<br;i++)
for(j=0;j<ln;j++) {
A[k][i][j] = count++;
cout<<A[k][i][j]<<" ";
}
Regards
Neil
--
+-----------------+---------------------------------+------------------+
| Neil Storer | Head: Systems S/W Section | Operations Dept. |
+-----------------+---------------------------------+------------------+
| ECMWF, | email: neil.storer_at_[hidden] | //=\\ //=\\ |
| Shinfield Park, | Tel: (+44 118) 9499353 | // \\// \\ |
| Reading, | (+44 118) 9499000 x 2353 | ECMWF |
| Berkshire, | Fax: (+44 118) 9869450 | ECMWF |
| RG2 9AX, | | \\ //\\ // |
| UK | URL: http://www.ecmwf.int/ | \\=// \\=// |
+--+--------------+---------------------------------+----------------+-+
| ECMWF is the European Centre for Medium-Range Weather Forecasts |
+-----------------------------------------------------------------+
|