CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

What does reduce do in parallel computing?

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   February 6, 2020, 08:47
Default What does reduce do in parallel computing?
  #1
Member
 
David Andersson
Join Date: Oct 2019
Posts: 46
Rep Power: 6
sippanspojk is on a distinguished road
Hi foamers,

I am adapting a code I wrote to work in parallel and I have some basic problems.

First of all, I don't understand what the reduce command is doing. Scatter and Gather I think I understand more or less; scatter divides my information and spread it on my procs and gather collects the information and assemble it on my master proc, correct? But reduce however I have no clue of what this is doing. Can someone help me here?



In my code I am reading the pressure values of each face of some specified patches, doing some computations using those values and then finally updating a custom defined scalarField.

I was then thinking that I should to do the following: gather the pressure field, read the pressure values, perform my computations, update my custom filed and lastly scatter the custom field before the next time step is taken. Is this correct?


I am really fumbling in the dark here so any kind of clarification would be very much appreciated.

Thanks,
David
sippanspojk is offline   Reply With Quote

 


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
Parallel computing on a personal workstation choiyun STAR-CCM+ 6 April 10, 2017 09:58
Parallel computing debate on transient simulations JuPa CFX 3 December 17, 2013 05:22
Error with parallel computing: MPI therandomestname FLUENT 1 June 28, 2012 04:12
Parallel Computing peter Main CFD Forum 7 May 15, 2006 09:53
Parallel Computing Classes at San Diego Supercomputer Center Jan. 20-22 Amitava Majumdar Main CFD Forum 0 January 5, 1999 12:00


All times are GMT -4. The time now is 19:32.