13.07.2015 Views

PGAS Programming with UPC and Fortran Coarrays

PGAS Programming with UPC and Fortran Coarrays

PGAS Programming with UPC and Fortran Coarrays

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.

Debugging barriersthe optional value exp can be used to check that all threads havereached the same barrierif a thread executes a barrier <strong>with</strong> different exp tag than the otherthreads, the application reports an expression mismatch <strong>and</strong> aborts very useful for making sure that all threads are on theintended execution path<strong>UPC</strong> 23Work sharing revisited4 th parameter in upc_forall loop represents affinityevaluate if MYTHREAD will execute an iterationaffinity is an integer expression affinity % THREADS == MYTHREADaffinity is a pointer-to-shared object pointed to has affinity to MYTHREAD upc_threadof(affinity)<strong>UPC</strong> 24–12

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

Saved successfully!

Ooh no, something went wrong!