Pstream Issue - Gathering Data for a Serial Computation in Parallel Mode
I have made a small routine, which is extremely cheap computational wise, and to ease the adoptation of this routine in parallel, I simply gather all data on the master node, perform the computation and scatter the results to all of the nodes.
Here is the problem:
The implementation works as intended, when the time folder is 0, however, if I need to restart the computation from, say, t = 331.2, then the program stalls, when reading from the slave-nodes.
The stalling occur on line 353 in the attached file.
Any help is mostly appreciated.
I'm not sure whether I can actually help or not but there are a couple of issues I can't understand maybe just because I only focused on the initParallel() member function.
1) at line 320:
labelList temp( ff.size() * 4 );
What does the 4 stand for?
2) I'm not familiar with the waitRequests() member but if everything it does is waiting all interprocessor communications are solved it seems to me that the parWrite at line 332 is missing the corresponding parRead.
I know that answering posing two additional questions is not the most efficient way to solve the problem but I got curious.
Thanks for your reply. Any suggestions/questions are appreciated, since I am a bit lost. To answer the questions:
Ad. 1.: The parWrite/parRead was not happy about the handling of a faceList. Therefore, and because I only need this functionality in 2D, where the boundary faces are quadrilateral, I could instead transfer a labelList, which size is 4 times the faceList. The faceList is reconstructed on the master node in the "if" on line 350.
Ad. 2.: I have had the same thought and I have tried having only none of them, or merely one of them, and then finally having them after the parRead on line 353.
A small update on this issue. It turned out that the problem was some completely different place in the code, but for some reason, the last place that was known to have been visited was the uploaded piece of code.
I obtained the information on the error message using
|All times are GMT -4. The time now is 04:14.|