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

How to run airFoil2D exapmle in parallel on 4 cores?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 8, 2011, 16:58
Default How to run airFoil2D exapmle in parallel on 4 cores?
  #1
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22
klausb will become famous soon enough
Hello,

I tried to run the airFoil2D example in parallel (4 core processor) using mpi but it didn't work. What's wrong?

My approach:

1. Created a decomposeParDict (and set y to 0 since it's a 2D case)
2. Ran decomposePar
3. Changed the Allrun batch file

decomposeParDict:

numberOfSubdomains 4;

method simple;

simpleCoeffs
{
n ( 2 2 0 );
delta 0.001;
}

hierarchicalCoeffs
{
n ( 1 1 0 );
delta 0.001;
order xyz;
}

metisCoeffs
{
processorWeights ( 1 1 1 1 );
}

manualCoeffs
{
dataFile "";
}

distributed no;

roots ( );


//************************************************** ***********************//

Allrun:

#!/bin/sh

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

application=`getApplication`

#runApplication $application
mpirun -np 4 $application -parallel > log &
klausb is offline   Reply With Quote

Old   January 8, 2011, 22:15
Smile Run Parallel
  #2
Member
 
Charlie
Join Date: Dec 2010
Location: USA
Posts: 85
Rep Power: 16
cheng1988sjtu is on a distinguished road
Since it's 2D case, and it's in xz plane, so maybe in the following line you can try:

simpleCoeffs
{
n ( 2 1 2 );
delta 0.001;
}

hierarchicalCoeffs
{
n ( 1 1 1 );
delta 0.001;
order xyz;
}

Hope it works~
cheng1988sjtu is offline   Reply With Quote

Old   January 9, 2011, 03:45
Default Solution
  #3
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22
klausb will become famous soon enough
Thank you! Also, the header text must be there.

Solution:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.x |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

numberOfSubdomains 4;

method simple;

simpleCoeffs
{
n ( 2 1 2 );
delta 0.001;
}

hierarchicalCoeffs
{
n ( 1 1 1 );
delta 0.001;
order xyz;
}

metisCoeffs
{
processorWeights ( 1 1 1 1 );
}

manualCoeffs
{
dataFile "";
}

distributed no;

roots ( );


// ************************************************** *********************** //
klausb 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
Unable to run OF in parallel on a multiple-node cluster quartzian OpenFOAM 3 November 24, 2009 14:37
Swap usage on parallel run nikhilesh OpenFOAM Running, Solving & CFD 0 April 30, 2009 10:50
Parallel Run Problems Jason Siemens 1 November 24, 2008 13:32
Cant run in parallel on two nodes using OpenMPI CHristofer Main CFD Forum 0 October 26, 2007 10:54
How to run parallel in ICEM_CFD? Kiddo Main CFD Forum 2 January 24, 2005 09:53


All times are GMT -4. The time now is 21:29.