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

Memory usage and chronological execution order in parallel runs

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 26, 2015, 16:11
Default Memory usage and chronological execution order in parallel runs
  #1
Member
 
hekseli
Join Date: Mar 2013
Posts: 49
Rep Power: 13
heksel8i is on a distinguished road
Hey!

I'm not very familiar with the OpenMpi or parallel programming and was wondering the following:

I have a very large scalarField, decomposed onto several processors in OpenFoam. I would like to do operations for the field in a way that I am sure that only one processor is working at a time, whereas others are just waiting for their turn. In principle as below but in this particular solution the problem is that all the processors are getting inside the if "simultaneously" and I would like to have only one processor doing stuff there alone (dependent processes...) So any solution for this?

Code:
    for (label procI = 0; procI < Pstream::nProcs(); procI++)
    {
        if(Pstream::myProcNo()==procI)
        {

             // Here I would do my operations

        }
    }

Secondly I have been wondering that if i use Pstream::gather command, may I end up into a situation with a very large field that single master processor can't handle the gathered field due to the memory overload or is still the memory shared somehow between processors (main still in RAM isn't it) ?


Cheers!
heksel8i is offline   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



All times are GMT -4. The time now is 02:12.