|
[Sponsors] |
Reconstruction of the parallel case with dynamic mesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 12, 2012, 11:10 |
Reconstruction of the parallel case with dynamic mesh
|
#1 |
Senior Member
|
Hi all!
Today I faced a problem with the reconstruction of the parallel case with dynamic mesh refinement used in the solver. First guess was that it is my solver's problem which could write not all the mesh data required for the reconstruction. But first trial with the interDyMFoam in parallel (4 CPUs) indicated the same problem. Let's go into details. So, simple run of the reconstructPar utility reports following symptoms: Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.1.1-221db2718bbb Exec : reconstructPar Date : Jul 12 2012 Time : 15:08:53 Host : "pc169" PID : 28123 Case : /media/Sim/alexanderv/New_CD_Labor/Term_03/VOF/DyM_Reconstruct/OFv211/damBreakWithObstacle nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Time = 0.02 --> FOAM FATAL IO ERROR: cannot find file file: /media/Sim/alexanderv/New_CD_Labor/Term_03/VOF/DyM_Reconstruct/OFv211/damBreakWithObstacle/processor0/0.02/polyMesh/pointProcAddressing at line 0. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 73. FOAM exiting 1. Use reconstructParMesh for mesh reconstruction 2. Use reconstructPar for the data reconstruction Step 1. a) First problem is that reconstructParMesh uses reconstruction tolerance 1e-07 and suppose we used default values writing simulation data as well as mesh modifications in ASCII format with 1e-06 precision. To override the defaults we use reconstructParMesh with -mergeTol 1e-06 b) Secondly reconstructParMesh during the run processes only one time step (correct?) either first or the lasr (wirh -latestTime flag). In any case I didn’t find automatic procession of all time dirs and -time <time> option works with the singe parameter only on the contrary to the reconstructPar -time <ranges>. So we will put it in a loop to reconstruct all time dirs. Step 2. Fails without clear reasons: Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.1.1-221db2718bbb Exec : reconstructPar Date : Jul 13 2012 Time : 16:04:04 Host : "pc169" PID : 19765 Case : /media/Sim/alexanderv/New_CD_Labor/Term_03/VOF/DyM_Reconstruct/OFv211/damBreakWithObstacle_clean.run1 nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Time = 0.02 #0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 in "/lib/libc.so.6" #3 Foam::objectRegistry::checkOut(Foam::regIOobject&) const in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #4 Foam::regIOobject::~regIOobject() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #5 Foam::IOList<int>::~IOList() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libfiniteVolume.so" #6 Foam::processorMeshes::read() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libreconstruct.so" #7 Foam::processorMeshes::readUpdate() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libreconstruct.so" #8 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/reconstructPar" #9 __libc_start_main in "/lib/libc.so.6" #10 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/reconstructPar" Segmentation fault Solution is to set “startFrom startTime;” in the controlDict and removing processor*/0 folders. In the attached script I backup them and then move back after data reconstruction. So hereby I’ve attached a bash script for automatic reconstruction of e.g. interDyMFoam parallel case to avoid modified mesh isues. Code:
#!/bin/bash ## Merge tollerance (to override default value 1e-07 for ASCII output) TOL=1e-06 ## Log file name LOG='log.reconstructParMesh' ## Start time folder name START='0' ## Check for empty time folders TIME_DIRS='' for proc_ in processor0/*; do dir_=`echo $proc_ | sed 's/processor0\///'` if [ ! -d $dir_ ]; then echo "Time $dir_ ist not reconstructed" ## For empty list if [ ! -n "$TIME_DIRS" ]; then TIME_DIRS=$dir_ else TIME_DIRS="$TIME_DIRS $dir_" fi fi done ## Exit if everything is reconstructed if [ ! -n "$TIME_DIRS" ]; then echo -e "\nNothing to reconstruct! Exiting..." exit 0 else ## Clean old log files rm -fv $LOG.* ## Reconstruct mesh and data echo -e "Reconstructing mesh for:\n" ## Mesh for dir_ in $TIME_DIRS; do echo -e "\tTime = $dir_ sec\n" reconstructParMesh -time $dir_ -mergeTol $TOL 2>&1 | tee $LOG.mesh done ## Set startFrom to startTime sed -i "s/startFrom.*\;/startFrom startTime\;/g" system/controlDict ## Rename zero time folders in the processor directories for proc_ in processor*; do mv -fv $proc_/$START $proc_/$START.backup done ## Data echo -e "Reconstructing data for times: $TIME_DIRS" reconstructPar -time `echo $TIME_DIRS | sed s/\ /,/g` 2>&1 | tee $LOG.data ## Rename zero time folders backups in the processor directories for proc_ in processor*; do mv -fv $proc_/$START.backup $proc_/$START done fi Here are some simulation and post-processing results: https://docs.google.com/open?id=0BzC...1k5YmVTZDdOT1k
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben http://smmp.unileoben.ac.at Last edited by makaveli_lcf; July 13, 2012 at 11:06. Reason: Fixed fail at the reconstructPar stage |
|
August 7, 2013, 11:18 |
|
#2 | |
Senior Member
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 17 |
Hi Alexander,
thanks for the script. Unfortunately, the data reconstruction doesn't work in my case (OF-2.1.x). I can't decrypt the error message: Quote:
Best regards, Ilya |
||
August 8, 2013, 05:27 |
|
#3 |
Senior Member
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 17 |
Solved. the error was because of insufficient RAM.
|
|
August 8, 2013, 05:56 |
|
#4 |
Senior Member
|
Effective)
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben http://smmp.unileoben.ac.at |
|
July 3, 2014, 06:51 |
|
#5 |
New Member
ttttoor
Join Date: Feb 2014
Posts: 10
Rep Power: 12 |
||
July 14, 2021, 12:20 |
|
#6 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19 |
Hi makaveli_lcf, thanks for the script. It really worked! Btw, I'm using OF v2012.
|
|
July 15, 2021, 07:04 |
|
#7 |
Senior Member
|
Hi! great that after 9 years it still works)
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben http://smmp.unileoben.ac.at |
|
October 18, 2023, 12:28 |
|
#8 |
New Member
Luke Hirl
Join Date: Jul 2023
Location: Gießen
Posts: 16
Rep Power: 3 |
also works for v2212
|
|
December 3, 2024, 12:16 |
also works for of-v9
|
#9 |
New Member
Zhao Zi Long
Join Date: Nov 2023
Posts: 1
Rep Power: 0 |
I used a simplified script command:
for dir in processor*; do [ -d "$dir" ] && find "$dir" -mindepth 1 -maxdepth 1 -type d -name '0.0012' -exec rm -rv {} \;; done 0.0012 is just an example time and can be replaced with other times. Actually, you don't need to make a backup because your initial file existed before partitioning, so I chose to delete it directly. Anyway, thank you for your script. It still helps me 12 years later today! |
|
Tags |
dynamic mesh, interdymfoam, pointprocaddressing, reconstructpar, reconstructparmesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
how to parallel run in moving mesh case | ELYOR | Siemens | 5 | June 16, 2008 04:23 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |
Dynamic Mesh in an In-cylinder case | venkitaraman | FLUENT | 0 | March 26, 2007 18:15 |
Automatic Mesh Motion solver | michele | OpenFOAM Running, Solving & CFD | 10 | September 26, 2005 09:21 |