|November 6, 2009, 03:29||
single directional message transmit in parallel model
I am new to parallel programming. Mybe my problem is easy for you. Would you mind giving me some suggestion?
I want to transmit some data from processor A to B, but B doesn't know there will some message coming from A. How can B received the message from A?
B may not transmit message to A. I mean the massage transmission is single directional.
I figured out a possible solution. In my question, once the message passages are established, they won't change at later time. Thus I think it better to construct the connection between A and B firstly, and transmit the message continuously at later time. To construct such a message passage beforehand, the connection of the current processor with interacting processors is broadcast, and in the destination processor the connection was constructed based on the message received.
In this method, all the processors will broadcast the connection once. How can I achieve this with OpenFOAM?
Mybe my method is a little awkward, would you mind giving me some good soultion or suggestions to this problem.
A critical problem is I don't knew how to broad a message to all the processors with current processors. Scatter? CombineScatter? combineScatterList?
Best Regards, Junwei.
|December 17, 2009, 08:00||
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129Rep Power: 9
You have to implement both, sending and recieving. The orders you need are:
For sending a scalar named "value" to processor n:
OPstream::write(Pstream::scheduled, n, reinterpret_cast<const char*>(&value), sizeof(scalar));
and for recieving a scalar from processor n, that should be stored in "value":
IPstream::read(Pstream::scheduled, n, reinterpret_cast<char*>(&value), sizeof(scalar));
Of course, these commands are to be executed by special processors, so first check the processor number using Pstream::myProcNo().
Hope this was helpfull
|Thread||Thread Starter||Forum||Replies||Last Post|
|Single v.s. double precision||Confused||CFX||13||Yesterday 06:39|
|User fortran error when running CFX-10 in parallel||CFDworker||CFX||3||September 22, 2015 08:59|
|CFX domain error message about multiphase model||Jane||CFX||0||March 5, 2009 11:30|
|Error message in CFX-10||CFDworker||CFX||2||October 12, 2007 07:23|
|interface warning message when running parallel||Kang||FLUENT||3||November 23, 2001 05:32|