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

How to run airFoil2D exapmle in parallel on 4 cores?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 8, 2011, 16:58
Default How to run airFoil2D exapmle in parallel on 4 cores?
  #1
Member
 
Klaus
Join Date: Mar 2009
Posts: 70
Rep Power: 8
klausb is on a distinguished road
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: 415 Kinross Dr. Newark, DE 19711
Posts: 78
Rep Power: 6
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
Member
 
Klaus
Join Date: Mar 2009
Posts: 70
Rep Power: 8
klausb is on a distinguished road
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

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
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 09:50
Parallel Run Problems Jason CD-adapco 1 November 24, 2008 13:32
Cant run in parallel on two nodes using OpenMPI CHristofer Main CFD Forum 0 October 26, 2007 09: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 08:16.