0% found this document useful (0 votes)
35 views4 pages

Open MP

The document discusses OpenMP and shared memory multiprocessing. OpenMP is an application programming interface that allows programs to utilize shared memory multiprocessing. It uses compiler directives like #pragma omp to parallelize loops and distribute work across multiple processors. OpenMP helps address issues like memory consistency that arise in shared memory multiprocessing systems.

Uploaded by

Ankur Hirwani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views4 pages

Open MP

The document discusses OpenMP and shared memory multiprocessing. OpenMP is an application programming interface that allows programs to utilize shared memory multiprocessing. It uses compiler directives like #pragma omp to parallelize loops and distribute work across multiple processors. OpenMP helps address issues like memory consistency that arise in shared memory multiprocessing systems.

Uploaded by

Ankur Hirwani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

wtth,

CROPRDCESSOR - Shaned Atmo * challene: Houo to woll


huYanhical MAMD
CPovalelum) Detp Tnuide i s Cache Memoy
unom Memomy Access eod Content hant).
Me moy nSequenhial Manntr pmvale pro pes A
Parallu i i
auving Tns he vel
processorcsMP).
nce
(1Ra Non Unit
Coheent Mem Access far shaving e ewe T LB TLB
Cache TvansThon kook stde Bultrr
Cache
ased dual Coe Pocss
for ConVinience w C shaoed Memey
Hoeta
fovatle Comp SMP) Sho
Moun
Cache Me mony: Higher speud, Snau size Uw
fo CPO, Enormous
Neare Cost TLe
CacCach CPU nq TLe
pLgn nsde
cach oloen fo sep Mm whab
Prodn duhnchon blw -he
bous whats
CaT
Mem
Palsnt un
PocesrS
athialy Mtm )
Cache Mem0y Sulernal
we 2
has itk on vel 1
tath Co n all conl Cach
¥ TndependeatH pmese
ir not ashased on.
Tpuiahon ot ivalt Cache emoj
*Wi encounlev MAm Consiolencu roblmn
we have sCM)shanad Cache Mmo
thon encounlen he prohlem.
we have diveloped otw
un one proce6
updorle data 'taLen place
w l be nohhio + another pro Ces
te COn alh
Sohe

CRen MP colves MLm Consuten cy blm.


tool
Opem MP
PYog sMP

*SM Contept ha to
pavalum
cocur

will be wittn s will eute un


Proa
S u u a l odor unst
encounter p, Lonto s t p
uny we

achieve arallelm?
* what we
T i m e . CCave tima)
whal i Open MP
e d by Aachcleetne Revieo oavd. Tatorface.
Applicahon ppqvammnq
oVen M s a shaned Memon CAPT)
Pagma teahme C / C t t lang.
h e Main Poog
doma c a n be emecuded bakone
Pragma
voids Inshuehon Sevalizahion
CLpchina An OPen MP
Po dinechve
* VA C/ct+, pragma"
arhe Uienge
U&Lage.
Seveval eauoey have eir Ocon c a c h e mm e m
single Man Mm
Shan
shaoe
Shaoedod Mem
Mem
dytdibuted em
L
ShanedMem Non-cache Coh Cache Cob
Cathe cackeCadd
tT M
t
Pavall og Modl

APT,Mnag Pasing Pproa o


*Dot Prod in MpT
Dot Pod utt Cseamential
ain (
unr Main c, argv
in a7qC

doubesumar6 3 b2s6) double Sum, m


local

double a cLouble
n Cs63; n , numpDCa.
fo i-o, 1<n;i4)
aci3 io5S
* I n Oen MP
Sum 0
tor i i , ien, i+t)
1Sum = Sum +Tafitb[r

P Csum " ,Sum)

You might also like