13.07.2015 Views

CUDA Libraries and MPI+OpenMP+CUDA - Prace Training Portal

CUDA Libraries and MPI+OpenMP+CUDA - Prace Training Portal

CUDA Libraries and MPI+OpenMP+CUDA - 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.

<strong>CUDA</strong> NEWD – Code Snippet (C)for( ih = 0, iih = 1; ih < nh[nt - 1]; ih++, iih++ ) {for( jh = ih, jjh = iih; jh < nh[nt - 1]; jh++, jjh++ ) {qvan2_(ptr_ngm, &iih, &jjh, ptr_nt, qmod, qgm, ylmk0);qecudaSafeCall( cudaMemcpy( qgm_D, qgm,sizeof( double ) * ngm * 2, cudaMemcpyHostToDevice ) );for( na = 0; na < nat; na++ ){if( ityp[na] == nt ) {blocksPerGrid = ( (nspin_mag * ngm * 2 ) + 256 - 1) / 256;kernel_compute_qgm_na(eigts1_D, eigts2_D, eigts3_D, ig1_D, ig2_D, ig3_D,qgm_D, nr1, nr2, nr3, na, ngm, qgm_na_D );qecudaGetLastError("kernel launch failure");...February 10, 2012 PRACE Winter School 201256

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

Saved successfully!

Ooh no, something went wrong!