|
[Sponsors] |
Code parallelization using Pstream: simultaneous send/receive deadlocking |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 9, 2012, 06:14 |
Code parallelization using Pstream: simultaneous send/receive deadlocking
|
#1 |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
Hi everyone,
I am trying to write the simplest parallel code that involves simultaneous communication accross processes: Proc1: Send(0),Receive(0) Proc2: Send(1),Receive(1) Of course, such code will experience a deadlock. There are multiple solutions for this beginner problem: exchanging the order of Send/Receive based on the process rank, using non-blocking communication, using buffered communication (bSend, bRecv), etc. Both the problem and possible solutions are explained here (Note: if the links don't work by clicking, copy/paste them): http://www.ncsa.illinois.edu/UserInf...IDeadlock.html and here: http://www.cs.ucsb.edu/~hnielsen/cs140/mpi-deadlocks.html So. I have tried to use these solutions in OpenFOAM, sending/receiving a scalarField around, and I keep getting errors. I linked the application source below, where you can uncomment parts of the code to get specific solutions (described in the links above). What I find strange is:
I am not sure if I am missing something obvious, but it seems strange that every option I try, fails. Also: I've switched on the Pstream debugSwitch in etc/controlDict, but I still don't see the debug info comming from the UPstream.C in the Pstream/mpi folder. This looks like my application is using the dummy implementation of UPstream and its children, instead of linking with stuff from Pstream/mpi. Download link (OpenFOAM 2.0.x): http://dl.dropbox.com/u/3316983/pStr...leExchange.tgz Tomislav Last edited by tomislav_maric; July 9, 2012 at 06:31. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What is the Better Way to Do CFD? | John C. Chien | Main CFD Forum | 54 | April 23, 2001 08:10 |
Open source CFD code development, possible? | Dr. Yazid Bindar | Main CFD Forum | 27 | July 18, 2000 00:18 |
State of the art in CFD technology | Juan Carlos GARCIA SALAS | Main CFD Forum | 39 | November 1, 1999 14:34 |
public CFD Code development | Heinz Wilkening | Main CFD Forum | 38 | March 5, 1999 11:44 |
What kind of Cmmercial CFD code you feel well? | Lans | Main CFD Forum | 13 | October 27, 1998 10:20 |