CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Pstream Issue - Gathering Data for a Serial Computation in Parallel Mode

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 26, 2012, 08:42
Default Pstream Issue - Gathering Data for a Serial Computation in Parallel Mode
  #1
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Dear all,

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.

Kind regards,

Niels
Attached Files
File Type: c sandSlide.C (23.7 KB, 70 views)
ngj is offline   Reply With Quote

Old   April 27, 2012, 06:03
Default
  #2
Member
 
cosimo bianchini
Join Date: Mar 2009
Location: Florence, Tuscany, Italy
Posts: 88
Rep Power: 17
cosimobianchini is on a distinguished road
Send a message via Skype™ to cosimobianchini
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.
__________________
Cosimo Bianchini

Ergon Research s.r.l.
Via Panciatichi, 92
50127 Florence - ITALY
Tel: +39 055 0763716
Mob: +39 320 9460153
e-mail: cosimo.bianchini@ergonresearch.it
URL: www.ergonresearch.it
cosimobianchini is offline   Reply With Quote

Old   April 27, 2012, 06:43
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Cosimo

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.

Thanks,

Niels
ngj is offline   Reply With Quote

Old   May 2, 2012, 17:32
Default
  #4
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi,

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
Code:
export FOAM_ABORT=1
Thanks for the attention.

Niels
ngj is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
parallel running issue xiaokang Fluent UDF and Scheme Programming 0 January 18, 2012 18:42
FLUENT in Windows Serial and Linux Parallel sham83 FLUENT 0 June 1, 2011 00:38
Issue with running in parallel on multiple nodes daveatstyacht OpenFOAM 7 August 31, 2010 18:16
parallel issue: global face zone/patch ... matteoL OpenFOAM Running, Solving & CFD 2 June 16, 2010 07:22
Help: Serial code to parallel but even slower Zonexo Main CFD Forum 4 May 14, 2008 11:26


All times are GMT -4. The time now is 14:43.