MPI运行时进程报错?

写MPI-openMP的时候报错,显示进程执行出问题。如下图:

img

请问各位大lao是啥子原因哦

#include
#include
#include
#include
#include
//int M,N;
//int myid;
int main(int argc,char* argv[])
{
    int M = 1000,N = 1000;
    int i,j,ii;//用来控制循环
    int tem;//暂时存储
    int myid;//存放MPI进程等级
    int local_result[M*N];//存放每一个线程的矩阵
    int local_Matrix_one[M*N];
    int result_Matrix[M][N];
    int Matrix_one[M*N];
    int Matrix_two[M*N];
    int local_M;
    //nem an matrix
    for(i = 0;ifor(j = 0;j10;
    for (j = 0;jfor(i = 0;i10;
    //    
    //MPI_Init(&argc,&argv);
    //MPI_Comm_rank(MPI_COMM_WORLD,&myid);
    
    //散播操作,将进程0的mtrix——one分割给
    MPI_Scatter(Matrix_one,local_M*N,MPI_INT,local_Matrix_one,local_M*N,MPI_INT,0,MPI_COMM_WORLD);
    //广播原语
    MPI_Bcast(Matrix_two,M*N,MPI_INT,0,MPI_COMM_WORLD);
    
    
    //OpenMP的计算部分
    
    #pragma omp parallel
    {
        int kk;
        #pragma omp for
        for(ii = 0;iifor(int jj = 0;jj0;
                //int kk;
                for(kk = 0;kk//MPI聚集结果
    MPI_Gather(local_result,local_M*N,MPI_INT,result_Matrix,local_M*N,MPI_INT,0,MPI_COMM_WORLD);
    if(myid == 0)
    {
        printf("Process 0 gather from other Process:\n");
        for(i = 0;ifor(j = 0;j"%d\t",result_Matrix[i][j]);
            
            printf("\n");
        }
    }
    
    MPI_Finalize();
    return 0;
    
    
}

你这串行都跑不了吧。local_M 没有值