0

hi there .. whats wrong with th e following code?

```
#include<mpi.h>
#include<stdio.h>
#include<math.h>
void main(int argc, char **argv)
{
int rank, row, i, j,s,p ;
int n;
int oldrow,oldcol,newrow,newcol;
MPI_Status status;
int z;
int delta_x,delta_y;
int temp_map[60][40];
int map[60][40];
int col;
z=oldrow,oldcol,newrow,newcol;
temp_map=0;
map=0;
printf("pls enter the row value\n");
scanf("%d", &n);
printf("you have enter the row %d\n",n);
for (i=0; i<n; i++)
{
printf("pls enter row value %d:", i+1);
scanf("%d", &row[i]);
}
printf("u hav input the numbers:\n");
for (i=0; i<n; i++)
{
printf("%d\n", row[i]);
}
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &p);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
s=n/p;
if(rank==0)
{
for(i=0,row=0;i<48;i++,row=row+10);
MPI_Send(&oldrow,s,MPI_INT,i,246,MPI_COMM_WORLD);
for(i=0;i<40;i++)
for(j=0;j<60;j++)
temp_map[i][j]=0;
for(i=0;i<(60*40);i++)
{
MPI_Recv(&oldrow,oldcol,newrow,newcol,1,MPI_INT,i,246,MPI_COMM_WORLD, &status);
if((newrow<0)||(newrow<=40)||(newcol<0)||(newcol<=60));
temp_map[newrow][newcol]=map[oldrow][oldcol];
}
for (i<0;i<40;i++)
for(j=0;j<60;j++)
map[i][j]=temp_map[i][j];
}
else
MPI_Recv(&oldrow,0,MPI_INT,i,246,MPI_COMM_WORLD,&status);
for(oldrow=row;oldrow<(row+10);oldrow++)
for(oldcol=col;oldcol<60;oldcol++)
{
newrow=oldrow+delta_x;
newcol=oldcol+delta_y;
MPI_Send(&oldrow,&oldcol,&newrow&newcol,0,MPI_INT,i,246,MPI_COMM_WORLD);
}
MPI_Finalize();
}
```