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

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

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 26, 2012, 07: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: Rotterdam, The Netherlands
Posts: 1,539
Rep Power: 23
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, 40 views)
ngj is online now   Reply With Quote

Old   April 27, 2012, 05:03
Default
  #2
Member
 
cosimo bianchini
Join Date: Mar 2009
Location: Florence, Tuscany, Italy
Posts: 88
Rep Power: 7
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

Energy Engineering Department "S. Stecco"
University of Florence
Via di S.Marta, 3
50139 Florence - ITALY
Tel: +39 055 4796575
Fax: +39 055 4796342
Mob: +39 320 9460153
e-mail: cosimo.bianchini@htc.de.unifi.it
URL: www.htc.de.unifi.it
cosimobianchini is offline   Reply With Quote

Old   April 27, 2012, 05:43
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,539
Rep Power: 23
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 online now   Reply With Quote

Old   May 2, 2012, 16:32
Default
  #4
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,539
Rep Power: 23
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 online now   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
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 17:42
FLUENT in Windows Serial and Linux Parallel sham83 FLUENT 0 May 31, 2011 23:38
Issue with running in parallel on multiple nodes daveatstyacht OpenFOAM 7 August 31, 2010 17:16
parallel issue: global face zone/patch ... matteoL OpenFOAM Running, Solving & CFD 2 June 16, 2010 06:22
Help: Serial code to parallel but even slower Zonexo Main CFD Forum 4 May 14, 2008 10:26


All times are GMT -4. The time now is 13:59.