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

machines file for running applications in parallel

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 14, 2011, 04:59
Default machines file for running applications in parallel
  #1
Senior Member
 
Join Date: Mar 2011
Posts: 158
Rep Power: 15
tH3f0rC3 is on a distinguished road
Hi,

I'm searching for a correct machines file to run an application in parallel.
I want to run with two cpu's.

I still have read this.
So I have created the decomposepart and a machines file.

I have attached the two file I have created.
I have also attached the errormessage.

I would be happy about suggestions how to solve.

Best Regards,
tH3f0rC3
Attached Files
File Type: txt machines.txt (1.3 KB, 124 views)
File Type: txt decomposeParDict.txt (1.4 KB, 45 views)
File Type: txt errormessage.txt (2.2 KB, 36 views)
tH3f0rC3 is offline   Reply With Quote

Old   April 14, 2011, 09:52
Default decomposePar
  #2
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Hi tH3f0rC

your decomposePar file is incorrect. As you want to use 2 CPUs and the simple decomposing method, you have to split the domain in 2 regions (not in 4). The correct decomposePar should look like this:

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

numberOfSubdomains 2;

method simple;

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

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

metisCoeffs
{
processorWeights ( 1 1 );
}

manualCoeffs
{
dataFile "";
}

distributed no;

roots ( );

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

the simple method splits the simulation domain in 2x1x1 regions corresponding to the number of the CPUs used.
As you work on one machine, you do not need a machine file. Just use the decomposePar and the mpirun afterwards.
Hope this helps.

Regards

Fabian
fabian_roesler is offline   Reply With Quote

Old   April 14, 2011, 10:20
Default
  #3
Senior Member
 
Join Date: Mar 2011
Posts: 158
Rep Power: 15
tH3f0rC3 is on a distinguished road
Hey thanks!
This helped a lot.

So now only one thing is left to mpirun the file.
I don't know the command I have to type in (in command line).

In OF docs there is only used a command with machines.

Can you also help my with that?

Best Regards,
tH3f0rC3
tH3f0rC3 is offline   Reply With Quote

Old   April 14, 2011, 10:54
Default mpirun on one machine
  #4
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Hi tH3f0rC3

with the command

mpirun -np 2 icoFoam -parallel

you start a multi processor run on 2 cores using the solver icoFoam in parallel. No log file is produced.
After the run you have to use reconstructPar. This should be all.

Best wishes

Fabian
fabian_roesler is offline   Reply With Quote

Old   April 14, 2011, 11:07
Default
  #5
Senior Member
 
Join Date: Mar 2011
Posts: 158
Rep Power: 15
tH3f0rC3 is on a distinguished road
Hey, thank you very much.
Now it works!!! :-)

Best Regards,
tH3f0rC3
tH3f0rC3 is offline   Reply With Quote

Old   April 19, 2011, 07:50
Default
  #6
Senior Member
 
Join Date: Mar 2011
Posts: 158
Rep Power: 15
tH3f0rC3 is on a distinguished road
Quote:
Originally Posted by fabian_roesler View Post
After the run you have to use reconstructPar. This should be all.
Hi Fabian,

I have now tried to use reconstructPar the solved files. The problem ist that I use the chtMulti-solvers, where the directories are stored different than in icoFoam.

so there is the folliwing error-message appearing:
--> FOAM FATAL ERROR:
Cannot find file "points" in directory "polyMesh" in times 0 down to constant

This is due to the directorys air, solid into the 0, constant and system directories.

Do you know how can solve this? In every processor (p0 and p1) directory there are files from 0 to 100. (controldict: endtime: 100)
If I copy these files into the case-directory I have only the files from processor0. But how to proceed with the files in processor1? I can only overwrite them manually and this can not be the solution.

Best Regards,
tH3f0rC3
tH3f0rC3 is offline   Reply With Quote

Old   April 19, 2011, 11:38
Default chtMultiRegionFoam -parallel
  #7
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Hi tH3f0rC3

I think you have to reconstruct every region for its own. So use something like:

reconstructPar -region air
reconstructPar -region solid

Although the visualization in Paraview is different to normal cases. You can have a look to the ./Allrun script in the tutorial. Hope I could help.

Best wishes

Fabian
fabian_roesler is offline   Reply With Quote

Old   April 19, 2011, 14:21
Default
  #8
Senior Member
 
Join Date: Mar 2011
Posts: 158
Rep Power: 15
tH3f0rC3 is on a distinguished road
Quote:
Originally Posted by fabian_roesler View Post
Hi tH3f0rC3

I think you have to reconstruct every region for its own. So use something like:

reconstructPar -region air
reconstructPar -region solid

Although the visualization in Paraview is different to normal cases. You can have a look to the ./Allrun script in the tutorial. Hope I could help.

Best wishes

Fabian
What do you mean exactly? Do you refer to a case which was solved in parallel? Because I don't know that a tutorial exists where a case solved in parallel is shown?!
Or do you refer to the chtMulti-solver?

Yes, your answer was very helpful!

Best Regards,
tH3f0rC3
tH3f0rC3 is offline   Reply With Quote

Old   April 19, 2011, 21:43
Default
  #9
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 to all!

@Luke Skywalker Please study this script:
Code:
tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun
The part that I think you are looking for right now is near the end of the script:
Code:
# Reconstruct
for i in bottomAir topAir heater leftSolid rightSolid
do
   reconstructPar -region $i > log.reconstructPar.$i 2>&1
done


echo
echo "creating files for paraview post-processing"
echo
for i in bottomAir topAir heater leftSolid rightSolid
do
   paraFoam -touch -region $i
done
May the force be with you.
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
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 15:11
openfoam 1.6 on debian etch romant OpenFOAM Installation 9 May 6, 2010 03:26
Installation of OpenFOAM-1.6 on Ubuntu 9.10 marval OpenFOAM Installation 2 March 17, 2010 09:33
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' mfiandor OpenFOAM Installation 2 January 25, 2010 10:50
OpenFOAM Install Script ljsh OpenFOAM Installation 82 October 12, 2009 12:47


All times are GMT -4. The time now is 12:51.