I define arrays in this way:
double uo[n+2][m+2][n1+2] , 
       vo[n+2][m+2][n1+2] , 
       wo[n+2][m+2][n1+2] ,
       du[n+2][m+2][n1+2] , 
       dv[n+2][m+2][n1+2] ,
       dw[n+2][m+2][n1+2] ,  
       w1[n+2][m+2][n1+2] , 
       z1[n+2][m+2][n1+2] ,
       z[n+2][m+2][n1+2]  ;
Once I made it as static double then error removes but it keeps running and does not terminate.
 
     
    