#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctionsapplication=$(getApplication)
runApplication blockMesh
#- Test writing collated format
runApplication decomposePar -fileHandler collated
runParallel $application -fileHandler collated
runApplication reconstructPar -latestTime -fileHandler collated#- Test writing uncollated format
runApplication -s uncollated decomposePar -fileHandler uncollated -force
runParallel -s uncollated $application -fileHandler uncollated#- Test uncollated+distributed running: copy to different roots
rm -rf machineA/fileHandler
mkdir -p machineA/fileHandler
( cd machineA/fileHandler && \r
cp -r ../../processor[0-1] . && \r
cp -r ../../system . && \r
mkdir -p constant && cp ../../constant/* constant
)
#- Note: slave node does not need constant&system since these are global
rm -rf machineB/fileHandler
mkdir -p machineB/fileHandler
( cd machineB/fileHandler && \r
cp -r ../../processor[2-3] .
)
#- Run with different roots
( d=$PWD && \r
cd machineA/fileHandler && \r
runParallel -s multiRoot $application \r
-fileHandler masterUncollated -ioRanks ‘(0 2)’ \r
-roots “(“$d/machineA” “$d/machineB” “$d/machineB”)”
)#- Restart from uncollated
runParallel -s collated $application -fileHandler collated
runApplication -s collated reconstructPar -latestTime -fileHandler collated#- Convert the parallel format to uncollated
runParallel foamFormatConvert -fileHandler uncollated#- Restart with multiple IO ranks
runParallel -s multiCollated \r
$application -fileHandler collated -ioRanks ‘(0 2)’#- Reconstruct the multi-rank format. Delete the collated directory
# since conflicts with the multi-collated directory
rm -rf processors4
runApplication -s multiCollated reconstructPar -latestTime \r
-fileHandler collated -ioRanks ‘(0 2)’#- Convert the multi-rank format to uncollated
runParallel -s uncollated foamFormatConvert -fileHandler uncollated#- Restart from multiCollated using collated
runParallel -s uncollated_from_multiCollated \r
$application -fileHandler uncollated#- Test collated+distributed running: copy to different roots
# Important: make sure to copy uniform since we’re copying it#- Delete all processor directories
runApplication -s collated decomposePar \r
-fileHandler collated -force -copyUniformrm -rf machineA/fileHandler
mkdir -p machineA/fileHandler
( cd machineA/fileHandler && \r
cp -r ../../processor* . && \r
cp -r ../../system . && \r
mkdir -p constant && cp ../../constant/* constant
)
#- Note: slave node does not need constant&system since these are global
rm -rf machineB/fileHandler
mkdir -p machineB/fileHandler#- Run with different roots
( d=$PWD && \r
cd machineA/fileHandler && \r
runParallel -s distributed_multiCollated $application \r
-fileHandler collated -ioRanks ‘(0 2)’ \r
-roots “(“$d/machineA” “$d/machineB” “$d/machineB”)”
)#——————————————————————————
実行年月:10/01/2020