|
[Sponsors] |
July 6, 2009, 10:27 |
Working in parallel with OpenFoam
|
#1 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
Hello,
I have some cases running on a High Performance Computer (SGI Altix 4700) in parallel with 16 CPUs. They produce a large amount of foam time directories. I need this time directories for checking my case during run but in the end I only need the time directories over a period of time. So my question: Is there any tool or any option of a tool which allows me to delete a huge amount of data in every processor* directory? Doing this by hand is to time expensive for me. May be I can tell reconstructPar to reconstruct more than one time directory and delete the processor* directories? thx for help, fs82 |
|
July 6, 2009, 10:53 |
|
#2 |
Member
Etienne Lorriaux
Join Date: Mar 2009
Location: Compiegne, France
Posts: 45
Rep Power: 17 |
Hello,
I think you are searching after the writeCOntrol, purgeWrite and writeInterval keywords in the controDict. Regards, Etienne. |
|
July 6, 2009, 10:57 |
|
#3 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
No, I know this possibility. But I want to keep the time directories until my run is finished, e.g. for error searching.
|
|
July 6, 2009, 11:13 |
|
#4 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi Fabian
Then I would suggest that you make some kind of shell script to run through the time directories. It could be something like this (warning, not tested) #!/usr/bin/bash list=`ls -d processor0/*` listP=`ls -d processor*` # this limit should be any of you liking, i.e. time step limit=20 for i in $i do var=${i#processor/} flag=`awk -v lim=$limit -v current=$var '{if (var>=limit) print GO}'` if [ -n $flag ] then for j in $listP do echo "Removing: " $j/$var # rm -r $j/$var done fi done As you can see, I have removed the "Remove" command. You can include it, if you find the above to work satisfactory. Best regards, Niels |
|
July 7, 2009, 03:40 |
|
#5 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
Allright, that is the answer I expected but I had a little hope that there is an option or a tool which I didn't found up to now to do this task. Thx Niels
kind regards, Fabian |
|
July 8, 2009, 04:36 |
|
#6 |
Senior Member
Prapanch Nair
Join Date: Mar 2009
Location: Bangalore, India
Posts: 105
Rep Power: 17 |
Hey,
If you just want to reconstruct only certain time directories from the processor folders you can simple do this: reconstructPar -latestTime (which will reconstruct the latest time step) reconstructPar -time 100 ( which will reconstruct the time step 100, or any number for that case). The same flags can be applied in many places. Like for example, you can do foamToVTK -latestTime You may write a short script that reconstruct a bunch of time steps. Hope this helps, Cheers, Prapanj. |
|
July 8, 2009, 04:46 |
|
#7 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
Thx I allready know the options of reconstructPar. But I need to reconstruct a period of time. Due to Niels suggestion I worte a little bash script to remove the unnecessary time directories in every processor* folder and afterwards I use reconstructPar without any option :-D I do not use the script provided by niels above, because I am not familiar with awk and do not like it very much. But there are many ways to achieve the same without using awk. So everything works fine :-D
thk Fabian |
|
July 8, 2009, 07:16 |
|
#8 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Quote:
Eg, reconstructPar -time 10:100,1000:2000,5000: The order of the time ranges should be irrelevant. Even overlapping time-ranges should work fine. |
||
July 8, 2009, 07:43 |
|
#9 |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
great, thats the information I was looking for. Thx a lot :-D
kind regards, Fabian |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 06:36 |
Help with parallel working instalation. | Jonathan | FLUENT | 9 | November 8, 2011 00:25 |
Modified OpenFOAM Forum Structure and New Mailing-List | pete | Site News & Announcements | 0 | June 29, 2009 06:56 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 12:16 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 15:25 |