12.07.2015 Views

Hybrid programming with MPI & OpenMP - Prace Training Portal

Hybrid programming with MPI & OpenMP - Prace Training Portal

Hybrid programming with MPI & OpenMP - Prace Training Portal

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Gram-Smith kernel:dealing <strong>with</strong> thread private allocatable array!$omp parallel default(shared), private( temp, k, ig )ALLOCATE( temp( ngw ) )!$omp doDO k = 1, kmaxcsc(k) = 0.0d0IF ( ispin(i) .EQ. ispin(k) ) THENDO ig = 1, ngwtemp(ig) = cp(1,ig,k) * cp(1,ig,i) + cp(2,ig,k) * cp(2,ig,i)END DOcsc(k) = 2.0d0 * SUM(temp)IF (gstart == 2) csc(k) = csc(k) - temp(1)ENDIFEND DO!$omp end doDEALLOCATE( temp )!$omp end parallel32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!