TUT: avoid xterm in mpi schema (multiWorld)
This commit is contained in:
parent
3a2e725253
commit
e2c8b0b13f
@ -3,8 +3,12 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
(cd left && cleanCase0)
|
||||
(cd right && cleanCase0)
|
||||
\rm -f log.*
|
||||
for subcase in left right
|
||||
do
|
||||
(
|
||||
cd "$subcase" && cleanCase0
|
||||
)
|
||||
done
|
||||
rm -f log.*
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -4,25 +4,40 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Run serial
|
||||
(cd left && runApplication blockMesh && \cp -r 0.orig 0)
|
||||
(cd right && runApplication blockMesh && \cp -r 0.orig 0)
|
||||
for subcase in left right
|
||||
do
|
||||
(
|
||||
cd "$subcase" || exit
|
||||
runApplication blockMesh && restore0Dir
|
||||
)
|
||||
done
|
||||
|
||||
mpirun -app ./mpirun_left_right.schema
|
||||
|
||||
# Run with database
|
||||
\mv log.run_left log.run_left_direct
|
||||
\mv log.run_right log.run_right_direct
|
||||
(cd left && foamListTimes -rm && \rm -r 0 && \cp -r 0.orig 0 && foamDictionary 0/T -entry boundaryField.coupled.sampleDatabase -add true)
|
||||
(cd right && foamListTimes -rm && \rm -r 0 && \cp -r 0.orig 0 && foamDictionary 0/T -entry boundaryField.coupled.sampleDatabase -add true)
|
||||
|
||||
for subcase in left right
|
||||
do
|
||||
(
|
||||
cd "$subcase" || exit
|
||||
foamListTimes -rm
|
||||
restore0Dir
|
||||
foamDictionary 0/T -entry boundaryField.coupled.sampleDatabase -add true
|
||||
)
|
||||
done
|
||||
|
||||
mpirun -app ./mpirun_left_right.schema
|
||||
|
||||
|
||||
|
||||
## Run parallel
|
||||
#(cd left && runApplication blockMesh)
|
||||
#(cd left && runApplication decomposePar)
|
||||
#(cd right && runApplication blockMesh)
|
||||
#(cd right && runApplication decomposePar)
|
||||
#
|
||||
#mpirun -app ./mpirun.schema
|
||||
## for subcase in left right
|
||||
## do
|
||||
## (
|
||||
## cd "$subcase" || exit
|
||||
## runApplication blockMesh && runApplication decomposePar
|
||||
## )
|
||||
## done
|
||||
## mpirun -app ./mpirun.schema
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -1,7 +1,2 @@
|
||||
-np 2 laplacianFoam -case ./left -world LEFT -parallel
|
||||
-np 2 laplacianFoam -case ./right -world RIGHT -parallel
|
||||
|
||||
#-np 1 xterm -font fixed -title processor0 -geometry 200x15+0+0 -e /home/mattijs/OpenFOAM/OpenFOAM-plus.feature-localWorld/applications/test/multiWorld/processor0.sh
|
||||
#-np 1 xterm -font fixed -title processor1 -geometry 200x15+0+200 -e /home/mattijs/OpenFOAM/OpenFOAM-plus.feature-localWorld/applications/test/multiWorld/processor1.sh
|
||||
#-np 1 xterm -font fixed -title processor2 -geometry 200x15+0+400 -e /home/mattijs/OpenFOAM/OpenFOAM-plus.feature-localWorld/applications/test/multiWorld/processor2.sh
|
||||
#-np 1 xterm -font fixed -title processor3 -geometry 200x15+0+600 -e /home/mattijs/OpenFOAM/OpenFOAM-plus.feature-localWorld/applications/test/multiWorld/processor3.sh
|
||||
-np 2 laplacianFoam -case left -world LEFT -parallel
|
||||
-np 2 laplacianFoam -case right -world RIGHT -parallel
|
||||
|
@ -1,2 +1,2 @@
|
||||
-np 1 xterm -font fixed -title processor0 -geometry 200x15+0+0 -e ./run_left.sh
|
||||
-np 1 xterm -font fixed -title processor1 -geometry 200x15+0+200 -e ./run_right.sh
|
||||
-np 1 ./run_left.sh
|
||||
-np 1 ./run_right.sh
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
laplacianFoam -case ./left -world LEFT 2>&1 | tee log.run_left
|
||||
laplacianFoam -case left -world LEFT 2>&1 | tee log.run_left
|
||||
read dummy
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
laplacianFoam -case ./right -world RIGHT 2>&1 | tee log.run_right
|
||||
laplacianFoam -case right -world RIGHT 2>&1 | tee log.run_right
|
||||
read dummy
|
||||
|
Loading…
Reference in New Issue
Block a user