title: Not responding during exeuting basic OpenMP (C) program
body: <p>I am currently new to OpenMp and trying to write a simple OpenMP-C matrix-vector multiplication program. On increasing the matrix size to 750x750 elements, my program stops responding and the window hangs. I would like to know if that is a limitation of my laptop or is it a data-race condition I am facing.</p>
  
  <p>I am trying to define a matrix A and a vector u and put random elements (0-10). Then I am calculating the vector result b.</p>
  
  <pre><code>#include &lt;omp.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main()
  {
      int x_range = 50;
      int y_range = 50;
      int A[x_range][y_range];
      int u[y_range];
      int b[y_range];
  
      printf("Measuring time resolution %g\n", omp_get_wtick());
      printf("Parallel program start time %g\n", omp_get_wtime());
      #pragma omp parallel num_threads(x_range)
      {
          int b_temp[y_range];
          for (int j = 0; j &lt; y_range; j++)
          {
              b_temp[j] = 0;
          }
          #pragma omp for
          for (int i = 0; i &lt; x_range; i++)
          {
              for (int j = 0; j &lt; y_range; j++)
              {
                  A[i][j] = (rand() % 10) + 1;
              }
          }
  
  
          #pragma omp for
          for (int j = 0; j &lt; y_range; j++)
          {
              {
                  u[j] = (rand() % 10) + 1;
              }
          }
  
  
          #pragma omp for
          for (int i = 0; i &lt; x_range; i++)
          {
              for(int j = 0; j &lt; y_range; j++)
              {
                  b_temp[i] = b_temp[i] + A[i][j]*u[j];
              }
          }
  
          #pragma omp critical
          for(int j = 0; j &lt; y_range; j++)
          {
              b[j] = b[j] + b_temp[j];
          }
      }
      printf("parallel program end time %g\n", omp_get_wtime());
  
      return 0;
  }
  </code></pre>