|
[Sponsors] |
Memory usage and chronological execution order in parallel runs |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 26, 2015, 16:11 |
Memory usage and chronological execution order in parallel runs
|
#1 |
Member
hekseli
Join Date: Mar 2013
Posts: 49
Rep Power: 13 |
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! |
|
|
|