Beowulf Cluster Computing with Linux, Second Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Beowulf Cluster Computing with Linux, Second Edition [Electronic resources] - نسخه متنی

William Gropp; Ewing Lusk; Thomas Sterling

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید







[83] is a popular and powerful language for specifying thread-based parallelism. While OpenMP provides some tools for general threaded parallelism, one of the most common uses is to parallelize a loop. If the loop contains no MPI calls, then OpenMP may be combined with MPI. For example, in the Jacobi example, OpenMP can be used to parallelize the loop computation:


exchange_nbrs( u_local, i_start, i_end, left, right );
#pragma omp for
for (i_local=1; i<=i_end-i_start+1; i++)
for (j=1; j<=NY; j++)
ulocal_new[i_local][j] =
0.25 * (ulocal[i_local+1][j] + ulocal[i_local-1][j] +
ulocal[i_local][j+1] + ulocal[i_local][j-1] -
h*h*flocal[i_local][j]);

This exploits the fact that MPI was designed to work well with other tools, leveraging improvements in compilers and threaded parallelism.

/ 198