title: use OpenMP and mpz_t malloc causes segmentation fault
body: <p>I need to use OpenMP programming with mpz_t array of 2^15 size to parallel the following code:</p>
  
  <pre><code>#pragma omp parallel for private(j,temp3)
  for(j=Real;j&lt;LL;j++)//l
      {
          for(__int64_t k=0;k&lt;=((j/(Real*1.0))/(log(sieve[i])/log(2.0)));k++)//l5
          {
              if((((j/(Real*1.0)-k*(log(sieve[i])/log(2.0)))&lt;LL))&amp;&amp;(((j/(Real*1.0)-k*(log(sieve[i])/log(2.0)))&gt;0)))// can log() use __int64_t?
                  mpz_add(temp3[j],temp3[j],temp2[(int)floor((j-k*Real*(log(sieve[i])/log(2.0))))]);
          }
          mpz_add_ui(temp3[j],temp3[j],(int)floor(((j/(Real*1.0))/(log(sieve[i])/log(2.0)))));
      }
  </code></pre>
  
  <p>I initial the array temp3 like this:</p>
  
  <pre><code>mpz_t temp3[LL];
  </code></pre>
  
  <p>and it causes Segmentation fault.So I tried to write like this:</p>
  
  <pre><code>mpz_t *temp3=(mpz_t *)malloc(sizeof(mpz_t)*LL);
  </code></pre>
  
  <p>it also causes Segmentation fault, and the malloc operation isn't successful.
  How to solve?  Thanks!</p>