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

redistributePar does not create 0 folder in new processor folders

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Swift
  • 1 Post By HPE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 29, 2019, 02:59
Default redistributePar does not create 0 folder in new processor folders
  #1
Member
 
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 46
Rep Power: 13
Rojj is on a distinguished road
Hi,

I am trying to use redistributePar to change the number of processors after snappyHexMesh.

I am using OF6.0 (www.openfoam.org) on ubuntu 18.04.

I have meshed my case with

Code:
mpirun -np NP snappyHexMesh -overwrite -parallel
At this point i have my NP processor folders all with 0 and constant subfolders.

I then update decomposeParDict with the new number of processors (NNP) - I am using scotch.

I finally run

Code:
mpirun -np NNP redistributePar -constant -overwrite -parallel
There are no errors and the new processor folders are created with the constant subfolder but without the 0 folder.

I then try to run simpleFoam with

Code:
mpirun -np NNP simpleFoam -parallel
but I receive the error 'cannot find patchfield' in the new processor folders as I expected.

I have also tried using renumberMesh

Code:
mpirun -np NNP renumberMesh -overwrite -parallel
This gives the same error as simpleFoam

Finally I tried to copy the original 0 folder to the various processors and run renumberMesh again (I knew it was wrong, but I didn't know what else to try!) and of course I had an error about inconsistent number of cells.

Any idea on how to use redistributePar correctly?

I have searched the forum and it seems the changeDictionary could be one possible solution. I tried, but I could not figure it out how to use it.

Thanks!

Last edited by Rojj; June 1, 2019 at 02:43.
Rojj is offline   Reply With Quote

Old   May 30, 2019, 06:45
Default
  #2
Member
 
Thomas Sprich
Join Date: Mar 2015
Posts: 76
Rep Power: 11
Swift is on a distinguished road
Hi Ruggiero,

What happens if you reconstruct the mesh after snappyHexMesh with

Code:
reconstructParMesh -constant
?

Then edit your decomposeParDict file for the new number of processors and then run:

Code:
decomposePar -force
Does that create the processor folders with 0 folders within them? This is the workflow that I use.

Regards,
Thomas
Swift is offline   Reply With Quote

Old   May 30, 2019, 07:00
Default
  #3
Member
 
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 46
Rep Power: 13
Rojj is on a distinguished road
Hi Thomas,

That is the typical workflow I use as well and it works fine (except that I do not need to use the -force option).

However I would like to avoid running reconstructParMesh and reconstructPar.

Unfortunately I cannot guarantee that the number of cores used for meshing is the same used for running the case. This is why I started to look into redistributePar.

Cheers
Rojj is offline   Reply With Quote

Old   May 30, 2019, 09:37
Default
  #4
Member
 
Thomas Sprich
Join Date: Mar 2015
Posts: 76
Rep Power: 11
Swift is on a distinguished road
Hi Ruggiero,

When you decompose your mesh before running snappyHexMesh, try running decomposePar with the copyZero flag, so:

Code:
decomposePar -copyZero
mpirun np NP snappyHexMesh -overwrite -parallel
and then run the commands as you had them listed.


Regards,
Thomas
BenGher likes this.
Swift is offline   Reply With Quote

Old   June 1, 2019, 02:56
Default
  #5
Member
 
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 46
Rep Power: 13
Rojj is on a distinguished road
Hi Thomas,

unfortunately I get the same problem: 0 folders are not copied to the new processors.

It seems that the option -copyZero is missing from redistributePar?

Interestingly if I use just decomposePar I get
Code:
.....
.....
Number of processor faces = 506
Max number of cells = 8800 (0% above average 8800)
Max number of processor patches = 1 (0% above average 1)
Max number of faces between processors = 506 (0% above average 506)

Time = 0

Processor 0: field transfer
Processor 1: field transfer

End
But if I use decomposePar -copyZero I get
Code:
Number of processor faces = 506
Max number of cells = 8800 (0% above average 8800)
Max number of processor patches = 1 (0% above average 1)
Max number of faces between processors = 506 (0% above average 506)

Processor 0: copying "/home/ubuntu/OpenFOAM/ubuntu-6/run/redistribute_New-Area_Baseline/N/0"
 to "/home/ubuntu/OpenFOAM/ubuntu-6/run/redistribute_New-Area_Baseline/N/processor0/0"
Processor 1: copying "/home/ubuntu/OpenFOAM/ubuntu-6/run/redistribute_New-Area_Baseline/N/0"
 to "/home/ubuntu/OpenFOAM/ubuntu-6/run/redistribute_New-Area_Baseline/N/processor1/0"

End
So it looks like it is doing something different, but still the 0 folders are not copied across
Rojj is offline   Reply With Quote

Old   September 4, 2019, 09:08
Default Same Problem
  #6
New Member
 
Vincent
Join Date: Aug 2019
Location: Germany
Posts: 14
Rep Power: 7
vince_cfd is on a distinguished road
Hello Rojj,

I have a similar problem: the 0 folder isn't copied when using decomposePar. For now I have just copied the important files (like U, p, T, epsilon ...) to the respective place for the 0 and the constant folder. I got the computation to work this way, but I still think it is weird to have to copy all of that by hand.

Have you been able to solve your problem?

Greetings
vince_cfd is offline   Reply With Quote

Old   September 11, 2019, 01:28
Default
  #7
Member
 
Ruggiero Guida
Join Date: Apr 2013
Location: World
Posts: 46
Rep Power: 13
Rojj is on a distinguished road
Hello Vincent,

I actually abandoned that test. I will definitely try your approach. I do everything programmatically so it should be quite easy to implement.

I will let you know how it goes. It will take a while though as I am quite busy with other tasks.

Cheers
Ruggiero
Rojj is offline   Reply With Quote

Old   September 11, 2019, 05:04
Default
  #8
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Hi!


What happens if you leave the -constant switch? I have used it many times without any problems. And I don't remember if the -constant was needed.
simrego is offline   Reply With Quote

Old   May 6, 2020, 13:27
Default
  #9
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6
otaolafr is on a distinguished road
Quote:
Originally Posted by Rojj View Post
Hello Vincent,

I actually abandoned that test. I will definitely try your approach. I do everything programmatically so it should be quite easy to implement.

I will let you know how it goes. It will take a while though as I am quite busy with other tasks.

Cheers
Ruggiero
hi rojj,
did you find a work around this? in the OF esi vr there is
Quote:
restore0Dir -processor
but not the case in the foundation vr, and as you i am using it (well the V.7 actually...). either way, did you solve it?
also i assume that
Quote:
mpirun -np NP ***** -parallel
gives the same result as:
Quote:
runParallel *****
,no? sorry i am still learning this software, and it is noooot an easy task ahahah.
hope to know if you find a solution.
best regards
otaolafr is offline   Reply With Quote

Old   May 12, 2020, 16:11
Default
  #10
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 12
HPE is on a distinguished road
Hi,

- "runParallel Y" is a bash script with which "mpirun -np X Y -parallel >& log.Y" is computed, where "X" the number of processors defined in "decomposeParDict" and "Y" is the OpenFOAM application which should be parallel executable.
otaolafr likes this.
HPE is offline   Reply With Quote

Old   August 10, 2020, 18:56
Default
  #11
New Member
 
Shahab
Join Date: Nov 2014
Posts: 1
Rep Power: 0
shahabgol is on a distinguished road
Hi,
The main reason is that your simulation does not start from time 0.
Correct this in your controlDict and 0 folders will appear on all the processors when you perform decomposePar
shahabgol is offline   Reply With Quote

Old   December 15, 2021, 05:22
Default
  #12
New Member
 
F
Join Date: Oct 2021
Posts: 10
Rep Power: 4
fran.cesc is on a distinguished road
I had the same problem.

The issue for me was that my 0 folder missed one of the required input files for the specific solver detailed in controlDict. I added the missing file in 0 and then decomposePar worked fine.
fran.cesc 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
postProcess -func sampleDict does not create output folder tmr2044 OpenFOAM Post-Processing 7 April 27, 2021 14:33
[OpenFOAM.com] v1612+ Windows: cannot create new folder calmdown911 OpenFOAM Installation 1 March 25, 2017 14:07
[OpenFOAM.com] v1606+ Run Folder JSMOKA OpenFOAM Installation 5 December 18, 2016 19:47
Cht tutorial in 15 braennstroem OpenFOAM Running, Solving & CFD 197 June 10, 2015 03:02
[ICEM] how to create a 2d tri mesh with quad mesh in the boundary layer seal2013 ANSYS Meshing & Geometry 3 October 6, 2013 16:09


All times are GMT -4. The time now is 20:09.