12.07.2015 Views

OpenMP

OpenMP

OpenMP

SHOW MORE
SHOW LESS

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

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

<strong>OpenMP</strong>dMPIddddddMPIddddddddddd <strong>OpenMP</strong>dddddddddddddddddddddddddddddddddddddddddd✞program mainuse omp_libuse mpiimplicit noneinteger, save:: iErr, MyID, NumNodesinteger i, jcall mpi_init(ierr)call mpi_comm_rank(mpi_comm_world, MyID ,iErr)call mpi_comm_size(mpi_comm_world, NumNodes, iErr)print∗,'MPI:␣My␣ID:␣', MyID, ',␣Number␣of␣Processes:␣', NumNodes!$omp paralleli=omp_get_num_threads()j=omp_get_thread_num()print∗, 'OMP:␣Thread␣Number:', j, ',␣Number␣of␣Threads:␣', i!$omp end parallelcall mpi_finalize(ierr)end✡✝✆ddd (ddddddd) <strong>OpenMP</strong>dddddd 2009d12d 80 / 85

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

Saved successfully!

Ooh no, something went wrong!