[mpich-discuss] Problem Regarding MPI Program

Tushar Patil tushar01patil at gmail.com
Thu May 31 09:01:56 CDT 2012


 Hello ..
  I am student in the university of pune doing project using parallel computing.
  Here i do a programe it takes input from 3 diffrent file in double
dimension array.
  i want to arrange(or permut) each column row-wise. i use the
function boradcast and gather
  and create the process as number of columns.
  But it gives the following error
---------------------------------------------------------------------------------------------------------------
  " rank 2 in job 3  tusharpucsd_48541   caused collective abort of all ranks
  exit status of rank 2: killed by signal 11
rank 1 in job 3  tusharpucsd_48541   caused collective abort of all ranks
  exit status of rank 1: killed by signal 11
rank 0 in job 3  tusharpucsd_48541   caused collective abort of all ranks
  exit status of rank 0: killed by signal 11
---------------------------------------------------------------------------------------------------------------

Here i paste the code


   int main(int argc , char *argv[])
{
  int row_count,col_count,r,c,i=0,p;
  char f1[25];
  char f2[25];
  char f3[25];

  int rank,size;
  MPI_Status status;

  MPI_Init(&argc,&argv);
  MPI_Comm_rank(MPI_COMM_WORLD,&rank);
  MPI_Comm_size(MPI_COMM_WORLD,&size);
void step2()
  {
    int i,j,revcnt,procCNT=col_count,k=0,p,c;
    int send_cnt = (row_count * col_count);
    int recv_cnt = (row_count * col_count);

    if(rank == 0)
      {
        MPI_Bcast(&a,send_cnt,MPI_DOUBLE,0,MPI_COMM_WORLD);
      }

    for(p=0;p<procCNT;p++)
      {
        if(rank = p)
          {
            MPI_Recv(&temp1,recv_cnt,MPI_DOUBLE,0,1,MPI_COMM_WORLD,&status);
            printf("Process:%d\n",rank);

            for(i=0;i<row_count;i=i+col_count)
              {
                for(j=0;j<col_count;j++)
                  {
                    temp1[k][j] = a[i+j][p];

//MPI_Gather(&a,send_cnt,MPI_DOUBLE,&temp1[k][j],recv_cnt,MPI_DOUBLE,MPI_COMM_WORLD);
                  }
                k = k+1;
              }
          }
        MPI_Gather(&a,send_cnt,MPI_DOUBLE,&temp1,recv_cnt,MPI_DOUBLE,0/*(root
process)*/,MPI_COMM_WORLD);
      }
    MPI_Finalize();
return 0;
}
---------------------------------------------------------------------------------------------------------
and also attach the whole programe file and expected output file.

please give me reply as soon as possible
-- 
Thanks and Ragards!
   -Tushar Patil.
      Msc (Computer Science)
      Deptt. Of Computer Science
      University Of Pune-411007
      Cell- = 7798789759
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2905.c
Type: text/x-csrc
Size: 2674 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20120531/55216f10/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output.txt1
Type: application/octet-stream
Size: 939 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20120531/55216f10/attachment.obj>


More information about the mpich-discuss mailing list