Allrun 687 Bytes
Newer Older
shunbo's avatar
shunbo committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
cd "${0%/*}" || exit                                # Run from this directory
#------------------------------------------------------------------------------

# Cleanup old junk that may prevent things from starting
rm -f comms/OpenFOAM.lock

# If this exits prematurely, trigger the external solver to stop
trap '[ -e comms/OpenFOAM.lock ] && echo "status=done" > comms/OpenFOAM.lock' EXIT TERM INT

Test-externalFileCoupler -slave -max 50 &

Test-externalFileCoupler -max 25

# Give some time for the slave to find updated file
sleep 2

[ -d comms ] && echo "status=done" > comms/OpenFOAM.lock

#------------------------------------------------------------------------------