View Issue Details

IDProjectCategoryView StatusLast Update
0003722OpenFOAMBugpublic2021-08-30 10:36
Reporterpeksa Assigned Tohenry  
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version15.04
Product Versiondev 
Fixed in Version9 
Summary0003722: mapFieldsPar hangs due to issue at createTimes.H
DescriptionDear developers,

I have noticed that sometimes when executing the mapFieldsPar utility in parallel, it hangs before the actual interpolation operation starts.
I have attached a simple test case which I have built with the OpenFOAM-dev (7b7fa5a9af93d3a8a733f3cbda72b3daf03cf3ce).

The problem seems to arise at createTimes.H on line 9 where the runTimeSource Time object is created.
I tested to change the definition such that instead of using the argument list, I build the Time
object as "Time runTimeSource(Time::controlDictName, rootDirSource, caseDirSource);" which seemed to
cure the issue (similar to the serial mapFields counter part).

Hence, as a fix I propose to change the createTimes.H implementation similar to mapFields serial version.
Steps To ReproduceRun the attached shell script in any directory. The script copies the cavity case, runs it and tries to map it in parallel onto another copied case.

TagsNo tags attached.



2021-08-29 16:29

reporter (1,585 bytes)   

cd ${0%/*} || exit 1    # Run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

    sed s/"20 20 1"/"41 41 1"/g $blockMeshDict > temp.$$
    mv temp.$$ $blockMeshDict
    #sed \
    #-e s/"\(startTime[ \t]*\) 0;"/"\1 0.5;"/g \
    #-e s/"\(endTime[ \t]*\) 0.5;"/"\1 0.7;"/g \
    #-e s/"\(deltaT[ \t]*\) 0.005;"/"\1 0.0025;"/g \
    #-e s/"\(writeControl[ \t]*\) timeStep;"/"\1 runTime;"/g \
    #-e s/"\(writeInterval[ \t]*\) 20;"/"\1 0.1;"/g \
    #$controlDict > temp.$$
    #mv temp.$$ $controlDict

rm -rf cavity*
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity .
cloneCase cavity cavityFine

pushd cavityFine > /dev/null
    runApplication blockMesh
    #set parallel version
    cp $FOAM_ETC/caseDicts/preProcessing/decomposeParDict system/decomposeParDict
    runApplication decomposePar
    runParallel icoFoam
popd > /dev/null

pushd cavity > /dev/null
    runApplication blockMesh
    #FAILS by ganging the execution
    cp $FOAM_ETC/caseDicts/preProcessing/decomposeParDict system/decomposeParDict
    runApplication decomposePar
    runParallel mapFieldsPar ../cavityFine -sourceTime latestTime -consistent
    #mapFieldsPar ../cavityFine -sourceTime 0.5 -consistent
    #mapFields ../cavityFine -sourceTime 0.5 -consistent
popd > /dev/null

#------------------------------------------------------------------------------ (1,585 bytes)   


2021-08-30 10:36

manager   ~0012175

Thanks for the detailed report, steps to reproduce and proposed fix.

Resolved in OpenFOAM-9 by commit 458e9281e163a355f724ee82cc6a4ec89fb6a65d
Resolved in OpenFOAM-dev by commit e6d7b7aa3f71cd28affe62d947091ce92f1b0025

Issue History

Date Modified Username Field Change
2021-08-29 16:29 peksa New Issue
2021-08-29 16:29 peksa File Added:
2021-08-30 10:36 henry Assigned To => henry
2021-08-30 10:36 henry Status new => resolved
2021-08-30 10:36 henry Resolution open => fixed
2021-08-30 10:36 henry Fixed in Version => 9
2021-08-30 10:36 henry Note Added: 0012175