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

Parallel Computing

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 25, 2012, 18:55
Question Parallel Computing
  #1
Member
 
Join Date: Jan 2010
Posts: 44
Rep Power: 7
Argen is on a distinguished road
I am using parallel computing for OpenFOAM and some FORTRAN subroutines are called by OF during computation. But, it's found that the errors occur when any Fortran subroutine (say my_test(a)) is called where a is defined as "double a[nCells]". The interesting is that it's no problem for calling it if a single processor is used. Any idea for this problem?

Last edited by Argen; June 28, 2012 at 12:43.
Argen is offline   Reply With Quote

Old   June 28, 2012, 12:44
Default
  #2
Member
 
Join Date: Jan 2010
Posts: 44
Rep Power: 7
Argen is on a distinguished road
any suggestion to sort it out?
Argen is offline   Reply With Quote

Old   June 28, 2012, 17:07
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Argen,

OK, the reason why it works in serial mode, but not in parallel, is very likely because "nCells" refers to the whole mesh and not the local processor's mesh only.

Uhm... I know there are applications in OpenFOAM that have similar needs, for both serial and parallel execution...
Sorry, I can't find any in a short period of time. You'll have to check the existing "applications" folder and see directly what code already exists that can do this.

The "applications/test" folder has many times true pearls of wisdom!
Here's an example that might be a good hint for what you're looking for - "applications/test/router/Test-processorRouter.C":
Code:
// Collect centres of individual meshes (for visualization only)
Gather<point> meshCentres(meshCentre(mesh));
The "Gather" template provides a way for gathering information from all processors. Nonetheless, this would imply that whenever you need to use the FORTRAN code, only the master processor could do the calculation...

Best regards and good luck!
Bruno
wyldckat is offline   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
unchangeable continuity residuals in parallel computing wlt_1985 FLUENT 0 August 1, 2011 12:15
Diffusion equation solved using Parallel Computing Sachin Paramane Main CFD Forum 0 June 11, 2007 23:48
Parallel Computing on Multi-Core Processors Upgrading Hardware CFX 6 June 7, 2007 15:54
Parallel Computing peter Main CFD Forum 7 May 15, 2006 09:53
Parallel Computing Classes at San Diego Supercomputer Center Jan. 20-22 Amitava Majumdar Main CFD Forum 0 January 5, 1999 13:00


All times are GMT -4. The time now is 08:46.