|
[Sponsors] |
February 28, 2015, 06:51 |
parallel problem: merging a list
|
#1 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 12 |
Hello, everyone.
Could anyone give me some hints how to gather statistics from different processors? e.g. the first two numbers of the list are calculated on processor 0, the second two numbers of the list are calculated on processor 1, etc. In other words, we have 8 cells of a computational domain and split the domain into 4 partitions. processor 0: 8 (1 1 0 0 0 0 0 0); processor 1: 8 (0 0 2 2 0 0 0 0); processor 2: 8 (0 0 0 0 3 3 0 0); processor 3: 8 (0 0 0 0 0 0 4 4); Then how can I gather the list from all processors like: 8 (1 1 2 2 3 3 4 4)? Any suggestion is appreciated! Thank you in advance! regards, wenxu |
|
March 1, 2015, 04:05 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings wenxu,
There's a test for that! Seriously, there is a test application in OpenFOAM's source code for merging lists from parallel processors, in the folder: "test/parallel" - you can see the path to this folder by running: Code:
echo $FOAM_APP/test/parallel Bruno
__________________
|
|
August 28, 2022, 11:28 |
|
#3 |
New Member
Doğukan Teber
Join Date: Jul 2022
Location: Izmir, Türkiye
Posts: 13
Rep Power: 3 |
Probably the problem is solved but for anyone who encounters the same problem in the future:
Code:
#include "PstreamReduceOps.H" reduce(data, sumOp<labelList>()); dogukanteber Last edited by dogukanteber; August 28, 2022 at 14:32. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem running OpenFOAM 2.2.x in parallel in Centos 5 | lvalvare | OpenFOAM Running, Solving & CFD | 33 | December 9, 2020 08:44 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 16:02 |
CFX parallel hp MPI problem | fluidmechanics | CFX | 5 | June 19, 2013 19:05 |
problem in the CFX12.1 parallel computation | BalanceChen | ANSYS | 2 | July 7, 2011 10:26 |
parallel mode - small problem? | co2 | FLUENT | 2 | June 1, 2004 23:47 |