Skip to content
Snippets Groups Projects
Commit 6de9bfb4 authored by Nandhana Sakhtivel's avatar Nandhana Sakhtivel
Browse files

Changes in readData

parent 066b4e17
Branches
No related tags found
No related merge requests found
...@@ -53,6 +53,7 @@ void init(int index) ...@@ -53,6 +53,7 @@ void init(int index)
MPI_Barrier(MPI_COMM_WORLD); MPI_Barrier(MPI_COMM_WORLD);
#endif #endif
clock_gettime(CLOCK_MONOTONIC, &finish); clock_gettime(CLOCK_MONOTONIC, &finish);
end = clock(); end = clock();
timing.setup_time = ((double) (end - start)) / CLOCKS_PER_SEC; timing.setup_time = ((double) (end - start)) / CLOCKS_PER_SEC;
...@@ -352,6 +353,8 @@ void readData() { ...@@ -352,6 +353,8 @@ void readData() {
printf("READING DATA\n"); printf("READING DATA\n");
}
fileName(datapath, in.ufile); fileName(datapath, in.ufile);
if(file.pFile = fopen (filename,"rb")) if(file.pFile = fopen (filename,"rb"))
{ {
...@@ -430,21 +433,9 @@ void readData() { ...@@ -430,21 +433,9 @@ void readData() {
exit(1); exit(1);
} }
}
#ifdef USE_MPI #ifdef USE_MPI
MPI_Barrier(MPI_COMM_WORLD); MPI_Barrier(MPI_COMM_WORLD);
#endif #endif
/* Communicating the relevent parameters to the other process */
#ifdef USE_MPI
MPI_Bcast(data.uu, metaData.Nmeasures * sizeof(double), MPI_BYTE, 0, MPI_COMM_WORLD);
MPI_Bcast(data.vv, metaData.Nmeasures * sizeof(double), MPI_BYTE, 0, MPI_COMM_WORLD);
MPI_Bcast(data.ww, metaData.Nmeasures * sizeof(double), MPI_BYTE, 0, MPI_COMM_WORLD);
MPI_Bcast(data.weights, metaData.Nweights * sizeof(float), MPI_BYTE, 0, MPI_COMM_WORLD);
MPI_Bcast(data.visreal, metaData.Nvis * sizeof(float), MPI_BYTE, 0, MPI_COMM_WORLD);
MPI_Bcast(data.visimg, metaData.Nvis * sizeof(float), MPI_BYTE, 0, MPI_COMM_WORLD);
#endif
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment