0

ok so i am making a program that has a master slave process. the master sends out the 2-d array which is 1000 by 1000 to the slaves. then the slaves calculate the sums of the rows sends back to the master who sums it all up. then the time is displays with the total sum. my problem is that i get this warning when i use the make makefile : mast_slave.c(44): (col. 2) remark: LOOP WAS VECTORIZED.

/usr/intel10/lib/libimf.so: warning: warning: feupdateenv is not implemented and will always fail

i dont know what this means. here is my code

```
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include "mpi.h"
#define N 1000
#define M 1000
int main(int argc, char* argv[])
{
int arr[N][M]; // 2-d array
int myrank, numprocs, i, j;
int master = 0;
double start;
double part_sum, tot_sum;
double MPI_Wtime(void);
MPI_Status status;
MPI_Init(&argc,&argv);
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
MPI_Comm_rank(MPI_COMM_WORLD,&myrank);// gets ranks
srand(time(NULL));
/* Master Process */
if( myrank == 0)
{
for( i=0;i < N; i++)
{ for( j = 0; j < M; j++)
{ arr[i][j] = rand();
}
}
}
/* Master broadcasts to the slaves */
MPI_Bcast( arr, N, MPI_DOUBLE,master, MPI_COMM_WORLD);
part_sum =0;
start = MPI_Wtime();
for( i = 0; i <N; i++)
{ for(j =0; j<M;j++)
{
part_sum = part_sum + arr[i][j];
}
}
printf("\n Sub sum was returned from %f\n", part_sum);
/* Slave processess send the sum back to master */
if( myrank !=0 )
{
MPI_Send( &part_sum, 1, MPI_DOUBLE, master, 1, MPI_COMM_WORLD);
}
else
{
tot_sum = part_sum;
for( i = 1; i < numprocs;i++)
{
MPI_Recv(&part_sum,1,MPI_DOUBLE,MPI_ANY_SOURCE,1,MPI_COMM_WORLD,&status);
tot_sum = tot_sum + part_sum;
}
}
if( myrank ==0)
{
printf("Total sum is %f\n", tot_sum);
printf("Time duration was %1.2f\n", (MPI_Wtime() - start));
}
MPI_Finalize();
return 0;
}
```