CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

How to handle the list in an openmp parallelism

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 25, 2008, 17:30
Default How to handle the list in an openmp parallelism
  #1
gonski
Guest
 
Posts: n/a
I met across a big problem in parallelizing my code. In my code, it needs to create a list to consider interactions between particles, see the following pseudo code. To parallelize the part of code, How can I avoid race conditions for k, f1,f2 in multi-thread calculations in the parallel loop?

Cheers, Gonski

Pseudo code to create neighbor list for particles

k=1

do i=1, n

Note: here many lines have been snipped

f1(k)=c1

if(something )then

Note: here many lines have been snipped

f2(k)=c2

endif

Note: here many lines have been snipped

if(something)then

k=k+1

endif

enddo
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 20:30
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 05:27.