|
[Sponsors] |
July 6, 2009, 23:14 |
Basic Parallel Communication Issues
|
#1 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
Hi all,
I've been trying to get my hands dirty with parallel programming in 1.5-dev; but I seem to have hit a road-block... Basically, I'm trying to perform a nonBlocking send/receive with the following code: Code:
mySendCode { OPstream::write ( Pstream::nonBlocking, neiProcNo, reinterpret_cast<const char*> ( &sendLblBuffer[patchI][0] ), sendLblBuffer[patchI].size()*sizeof(label) ); OPstream::write ( Pstream::nonBlocking, neiProcNo, reinterpret_cast<const char*> ( &sendSclBuffer[patchI][0] ), sendSclBuffer[patchI].size()*sizeof(scalar) ); } Code:
myReceiveCode { // Size the buffers recvLblBuffer[patchI].setSize(nRecvFaces[patchI], 0); recvSclBuffer[patchI].setSize(nRecvFaces[patchI], 0.0); IPstream::read ( Pstream::nonBlocking, neiProcNo, reinterpret_cast<char*> ( recvLblBuffer[patchI].begin() ), recvLblBuffer[patchI].byteSize() ); IPstream::read ( Pstream::nonBlocking, neiProcNo, reinterpret_cast<char*> ( recvSclBuffer[patchI].begin() ), recvSclBuffer[patchI].byteSize() ); OPstream::waitRequests(); IPstream::waitRequests(); } Code:
[2] wrong token type - expected int found on line 0 the string "%" [2] [2] file: IOstream at line 0. [2] [2] From function operator>>(Istream&, int&) [2] in file primitives/int/intIO.C at line 74. Thanks, Sandeep |
|
July 6, 2009, 23:25 |
|
#2 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
Oops... Sorry folks. That was a bug on my part. You'll notice that the error actually refers to intIO.C. (Which was due to an earlier blocking send/receive).
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Basic rules for mesh partition for parallel runs | hsieh | OpenFOAM Running, Solving & CFD | 1 | December 24, 2006 12:07 |
basic rules for partition domain for parallel run | phsieh2005 | Main CFD Forum | 19 | September 18, 2006 10:34 |
Windows 64-bit, Distributed Parallel Run Issues... | Erich | CFX | 3 | March 28, 2006 17:36 |
boundary layer simulation : basic issues | amol palekar | Main CFD Forum | 0 | July 27, 2004 19:22 |
Parallel Computing Classes at San Diego Supercomputer Center Jan. 20-22 | Amitava Majumdar | Main CFD Forum | 0 | January 5, 1999 13:00 |