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

Parallel Computing

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 25, 2012, 19:55
Question Parallel Computing
  #1
Member
 
Join Date: Jan 2010
Posts: 44
Rep Power: 16
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 13:43.
Argen is offline   Reply With Quote

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

Old   June 28, 2012, 18:07
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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


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
unchangeable continuity residuals in parallel computing wlt_1985 FLUENT 0 August 1, 2011 13:15
Diffusion equation solved using Parallel Computing Sachin Paramane Main CFD Forum 0 June 12, 2007 00:48
Parallel Computing on Multi-Core Processors Upgrading Hardware CFX 6 June 7, 2007 16:54
Parallel Computing peter Main CFD Forum 7 May 15, 2006 10: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:39.