From bc859aac5993e19dc8661a8958a348b1205bcc3a Mon Sep 17 00:00:00 2001
From: Barbariansyah <bariansyahi@gmail.com>
Date: Fri, 27 Mar 2020 22:11:24 +0700
Subject: [PATCH] bersihin bekas openmp

---
 src/main.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/main.c b/src/main.c
index 9133a19..c9972b9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -7,30 +7,28 @@ long int *calculate_sub_matrix(long int *matrix, int node_count);
 
 int main(int argc, char *argv[])
 {
-    int thread_count = strtol(argv[1], NULL, 10);
+    // int thread_count = strtol(argv[1], NULL, 10);
     char print_dist;
 
     setvbuf(stdout, NULL, _IONBF, 0);
     srand(13517003);
 
-    if (argc < 2)
-    {
-        printf("usage: main <num_of_nodes>");
-        exit(-1);
-    }
+    // if (argc < 2)
+    // {
+    //     printf("usage: main <num_of_nodes>");
+    //     exit(-1);
+    // }
 
-    int node_count = atoi(argv[2]);
+    int node_count = atoi(argv[1]);
     long int *adj_matrix = create_adj_matrix(node_count, node_count);
 
-    double start_time = omp_get_wtime();
     long int *sub_dist = calculate_sub_matrix(adj_matrix, node_count);
-    double time = omp_get_wtime() - start_time;
 
-    printf("Elapsed Time : %f\n", time*1000000);
+
     printf("Print distances to stdout? [y/N] ");
     scanf("%c", &print_dist);
 
-    print_matrix_to_file(sub_dist, node_count, node_count, argv[3]);
+    print_matrix_to_file(sub_dist, node_count, node_count, argv[2]);
     if (print_dist == 'y' || print_dist == 'Y')
     {
         print_matrix(sub_dist, node_count, node_count);
-- 
GitLab