ENH: more flexible handling of FOAM_IORANKS

- accept plain lists (space or comma separated) as well as the
  traditional OpenFOAM lists. This simplifies argument handling
  with job scripts.

  For example,
     simpleFoam -ioRanks 0,4,8 ...
  vs
     simpleFoam -ioRanks '(0 4 8)'  ...

  It is also possible to select the IO ranks on a per-host basis:

     simpleFoam -ioRanks host  ...

- expose rank/subrank handling as static fileOperation methods
This commit is contained in:
Mark Olesen
2023-05-17 11:24:44 +02:00
parent 336422e00b
commit 06147dabe7
14 changed files with 680 additions and 120 deletions

View File

@ -47,7 +47,7 @@ mkdir -p machineB/fileHandler
( d=$PWD && \
cd machineA/fileHandler && \
runParallel -s multiRoot $application \
-fileHandler masterUncollated -ioRanks '(0 2)' \
-fileHandler masterUncollated -ioRanks '0,2' \
-roots "(\"$d/machineA\" \"$d/machineB\" \"$d/machineB\")"
)
@ -60,13 +60,13 @@ runParallel foamFormatConvert -fileHandler uncollated
#- Restart with multiple IO ranks
runParallel -s multiCollated \
$application -fileHandler collated -ioRanks '(0 2)'
$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 \
-fileHandler collated -ioRanks '(0 2)'
-fileHandler collated -ioRanks '0,2'
#- Convert the multi-rank format to uncollated
runParallel -s uncollated foamFormatConvert -fileHandler uncollated
@ -99,7 +99,7 @@ mkdir -p machineB/fileHandler
( d=$PWD && \
cd machineA/fileHandler && \
runParallel -s distributed_multiCollated $application \
-fileHandler collated -ioRanks '(0 2)' \
-fileHandler collated -ioRanks '0,2' \
-roots "(\"$d/machineA\" \"$d/machineB\" \"$d/machineB\")"
)