title: Accelerate framework uses only one core on Mac M1
body: <p>The following C program (dgesv_ex.c)</p>
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  
  /* DGESV prototype */
  extern void dgesv( int* n, int* nrhs, double* a, int* lda, int* ipiv,
                  double* b, int* ldb, int* info );
  
  /* Main program */
  int main() {
          /* Locals */
          int n = 10000, info;
          /* Local arrays */
          /* Initialization */
          double *a = malloc(n*n*sizeof(double));
          double *b = malloc(n*n*sizeof(double));
          int *ipiv = malloc(n*sizeof(int));
          for (int i = 0; i &lt; n*n; i++ )
          {
                  a[i] = ((double) rand()) / ((double) RAND_MAX) - 0.5;
          }
          for(int i=0;i&lt;n*n;i++)
          {
              b[i] = ((double) rand()) / ((double) RAND_MAX) - 0.5;
          }
  
          /* Solve the equations A*X = B */
          dgesv( &amp;n, &amp;n, a, &amp;n, ipiv, b, &amp;n, &amp;info );
          free(a);
          free(b);
          free(ipiv);
          exit( 0 );
  } /* End of DGESV Example */
  </code></pre>
  <p>compiled on a Mac mini M1 with the command</p>
  <pre><code>clang -o dgesv_ex dgesv_ex.c -framework accelerate
  </code></pre>
  <p>uses only one core of the processor (as also shown by the activity monitor)</p>
  <pre><code>me@macmini-M1 ~ % time ./dgesv_ex 
  ./dgesv_ex  35,54s user 0,27s system 100% cpu 35,758 total
  </code></pre>
  <p>I checked that the binary is of the right type:</p>
  <pre><code>me@macmini-M1 ~  % lipo -info dgesv
  Non-fat file: dgesv is architecture: arm64
  </code></pre>
  <p>As a comparaison, on my Intel MacBook Pro I get the following output :</p>
  <pre><code>me@macbook-intel ˜ % time ./dgesv_ex
  ./dgesv_ex  142.69s user 0,51s system 718% cpu 19.925 total
  </code></pre>
  <p>Is it a known problem ? Maybe a compilation flag or else ?</p>