CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   machines file for running applications in parallel (https://www.cfd-online.com/Forums/openfoam/87217-machines-file-running-applications-parallel.html)

tH3f0rC3 April 14, 2011 03:59

machines file for running applications in parallel
 
3 Attachment(s)
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

fabian_roesler April 14, 2011 08:52

decomposePar
 
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

tH3f0rC3 April 14, 2011 09:20

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

fabian_roesler April 14, 2011 09:54

mpirun on one machine
 
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

tH3f0rC3 April 14, 2011 10:07

Hey, thank you very much.
Now it works!!! :-)

Best Regards,
tH3f0rC3

tH3f0rC3 April 19, 2011 06:50

Quote:

Originally Posted by fabian_roesler (Post 303628)
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

fabian_roesler April 19, 2011 10:38

chtMultiRegionFoam -parallel
 
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

tH3f0rC3 April 19, 2011 13:21

Quote:

Originally Posted by fabian_roesler (Post 304244)
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

wyldckat April 19, 2011 20:43

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


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