Revision history for OpenMP


Revision [26996]

Last edited on 2018-05-03 01:13:56 by ToBo
Additions:
Another example
%%(cpp)
#pragma omp parallel for
for (mcy=0; mcy<mv_size_y; mcy++)
y = mcy * size + m_offset_y;
for (mcx=0; mcx<mv_size_x; mcx++)
....
%%
==a==Compile==a==
use -fopenmp
LIBS="-fopenmp -lraspicam_cv -lraspicam `pkg-config --libs opencv`"
SRC="imageproc.cpp"
g++ -O3 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -ftree-vectorize -mfloat-abi=hard -o imageproc $SRC $LIBS && ./imageproc
==a==Run programm==a==
export OMP_NUM_THREADS=4
./my_prog


Revision [7687]

Edited on 2009-01-31 01:56:26 by ToBo
Additions:
~-erst ab [[http://www.linux-magazin.de/heft_abo/ausgaben/2007/08/schneller_parallel GNU Compiler 4.2]]


Revision [7586]

Edited on 2009-01-23 10:59:23 by ToBo
Additions:
lib32gomp1
GCC OpenMP (GOMP) support library (32bit)
lib32gomp1-dbg
GCC OpenMP (GOMP) support library (32 bit debug symbols)
GnuCompiler


Revision [7110]

Edited on 2008-12-18 02:36:46 by ToBo
Additions:
=====""OpenMP""=====
● ""OpenMP"" ist nur für Parallelrechner mit gemeinsamem Speicher geeignet.
Deletions:
=====OpenMP=====
● OpenMP ist nur für Parallelrechner mit gemeinsamem Speicher geeignet.


Revision [7109]

Edited on 2008-12-18 02:33:36 by ToBo
Additions:
==a==Informationsmaterial==a==
Deletions:
==a==Informationsmaterial==a===


Revision [7108]

Edited on 2008-12-18 02:33:22 by ToBo
Additions:
==a==Informationsmaterial==a===
~-[[http://www.mcs.anl.gov/research/projects/mpich2/ Übungen]]
~~-Introduction to OpenMP
~-http://de.wikipedia.org/wiki/OpenMP
Deletions:
http://de.wikipedia.org/wiki/OpenMP


Revision [6954]

Edited on 2008-12-08 01:58:53 by ToBo
Additions:
CategoryStudiumSE


Revision [6880]

Edited on 2008-12-07 17:15:27 by ToBo
Additions:
Siehe auch [[Mpi]] - {{backlinks}}
Deletions:
Siehe auch Mpi - {{backlinks}}


Revision [6879]

Edited on 2008-12-07 17:15:15 by ToBo
Additions:
Siehe auch Mpi - {{backlinks}}
Deletions:
Siehe auch {{backlinks}}


Revision [6878]

Edited on 2008-12-07 17:14:53 by ToBo
Additions:
==a==Eigenschaften==a==
==a==Umsetzung im Code==a==
==a==Prinzip==a==
==a==Beispiel==a==
==a==Implementierung==a==
[[http://de.wikipedia.org/wiki/OpenMP OpenMP]] anders als der MPI-Standard. Mit Compiler-Anweisungen (pragma) wird Parallelverarbeitung realisiert. Am Anfang leichter, aber nicht ganz Problemfrei.


Revision [6858]

Edited on 2008-12-06 15:05:57 by ToBo
Additions:
<referenzierter Bereich, enthält C/C++ Anweisungen>
~-Aufteilung eines Bereichs auf verschiedene Threads
~-Bearbeitung mit lokalen Variablen in verschiedenen Threads
Deletions:
<referenzierter Bereich, enthält C/C++ Anweisungen>


Revision [6857]

Edited on 2008-12-06 14:57:28 by ToBo
Additions:
=====OpenMP=====
● OpenMP ist nur für Parallelrechner mit gemeinsamem Speicher geeignet.
● Schnittstellen für Fortran und C/C++
● Industriestandard (V1.0 in 1998, V2.0 in 2002, V2.5 in 2005, V3.0 in 2008)
● Erhältlich auf vielen Plattformen (vergleichbar mit MPI)
● erlaubt eine schrittweise Parallelisierung
● kommerziell und als OpenSource (Sun Studio und GCC) verfügbar
● URL: http://www.openmp.org , Text des Standards auf der Webseite verfügbar.
http://de.wikipedia.org/wiki/OpenMP
%%(c)
#pragma omp <Direktive> <Klauseln>
{
<referenzierter Bereich, enthält C/C++ Anweisungen>
}
%%
%%(c)
#include <omp.h>
int main () {
int nthreads, tid;
omp_set_num_threads(3);
printf("maxthreads=%d\n", omp_get_max_threads());
/* Fork a team of threads giving them their
own copies of variables */
#pragma omp parallel private(nthreads, tid)
{
/* Obtain and print thread id */
tid = omp_get_thread_num();
printf("Hello World from thread = %d\n", tid);
/* Only master thread does this */
if (tid == 0)
{
nthreads = omp_get_num_threads();
printf("Number of threads = %d\n", nthreads);
}
}
/* All threads join master thread and terminate */
return 0;
}
%%
Deletions:
=====Titel=====


Revision [6856]

The oldest known version of this page was created on 2008-12-06 14:48:16 by ToBo
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki