Changes between Version 14 and Version 15 of openmp_programming


Ignore:
Timestamp:
May 23, 2008, 11:55:14 AM (16 years ago)
Author:
rider
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • openmp_programming

    v14 v15  
    108108
    109109=== Fortran - General Code Structure ===
     110
     111{{{
     112
     113PROGRAM HELLO //Program_Name: HELLO
     114
     115       INTEGER VAR1, VAR2, VAR3
     116
     117       Serial code
     118             .
     119             .
     120             .
     121
     122       Beginning of parallel section. Fork a team of threads.
     123       Specify variable scoping
     124
     125!$OMP PARALLEL PRIVATE(VAR1, VAR2) SHARED(VAR3)
     126
     127       Parallel section executed by all threads
     128             .
     129             .
     130             .
     131
     132       All threads join master thread and disband
     133
     134!$OMP END PARALLEL
     135
     136       Resume serial code
     137             .
     138             .
     139             .
     140
     141       END
     142
     143}}}
     144
    110145=== C / C++ - General Code Structure ===
    111146
    112 '''Conclusion''': EZ Code Revision - All you need to do is just parallelize the loop in your code by following the structure. Enjoy Using OpenMP !
     147{{{
     148
     149#include <omp.h>
     150
     151main ()  {
     152
     153int var1, var2, var3;
     154
     155Serial code
     156      .
     157      .
     158      .
     159
     160Beginning of parallel section. Fork a team of threads.
     161Specify variable scoping
     162
     163#pragma omp parallel private(var1, var2) shared(var3)
     164  {
     165
     166  Parallel section executed by all threads
     167        .
     168        .
     169        .
     170
     171  All threads join master thread and disband
     172
     173  } 
     174
     175Resume serial code
     176      .
     177      .
     178      .
     179
     180}
     181
     182}}}
     183[[BR]]
     184
     185'''Conclusion''': EZ Code Revision - All you need to do is just parallelize the loop in your code by following the structure. Enjoy Using OpenMP ! [[BR]]
     186[[BR]]
    113187=================================================================================================
    114 PS:
    115 
    116 '''Information for Kerrighed & OpenMP Users''' [[BR]]
     188'''More Information from Kerrighed Dev Team'''
     189
     190Information for Kerrighed & OpenMP Users [[BR]]
    117191From: DR. Renaud Lottiaux [[BR]]
    118192To: Rider [[BR]]
     
    128202Hi !
    129203
     204
    130205Currently, the openMP support has been disabled. More generally, the support
    131206for distributed threads is no more functionnal.