diff --git a/jb.txt b/jb.txt index 30d010708b02ed12daa80d003ff38b086960642b..aeccc91722d35f6b4c006efee98dbbe2448118eb 100644 --- a/jb.txt +++ b/jb.txt @@ -1,4 +1,4 @@ -0 0 0 0 0 0 0 0 0 0 +0 11000 6740 527 11681 11896 4045 2091 9336 6705 11000 0 4330 10473 15111 9486 6955 8909 6926 4295 6740 4330 0 6213 10781 5156 2695 4649 2596 35 527 10473 6213 0 12208 11369 3518 1564 8809 6178 diff --git a/src/dijkstra.c b/src/dijkstra.c index 656c22aa889adda681cc83bc9273053e9ddccf25..08dec14c10e5d300681898b8f33d93923aa869b0 100644 --- a/src/dijkstra.c +++ b/src/dijkstra.c @@ -44,13 +44,19 @@ int main(int argc, char* argv[]) } start=omp_get_wtime(); - #pragma omp parallel num_threads(thread_count) + #pragma omp parallel num_threads(thread_count) private(distance) { distance = malloc(total_node *sizeof(int )); #pragma omp for for (int i =0; i<total_node; i++){ + dijkstra(graph, total_node,i, distance); + // printf("\nDistance of from node%d=",i); + // for(int i=0;i<total_node;i++){ + // printf("%d ", distance[i]); + // } + // printf("~~~~~~\n"); for (int j=0; j<total_node; j++){ mat_res[i][j] = distance[j]; } @@ -70,7 +76,8 @@ int main(int argc, char* argv[]) //ending clock time end=omp_get_wtime(); - printf("\nThe algorithm took %f seconds to run with %d processes\n", end-start,thread_count); + printf("\nThe algorithm took %f seconds to run with %d processes\nNow seek for jb.txt in root folder\n", + end-start,thread_count); return 0; }