diff --git a/applications/test/externalFileCoupler/Allclean b/applications/test/externalFileCoupler/Allclean new file mode 100755 index 0000000000..ad4e6f3301 --- /dev/null +++ b/applications/test/externalFileCoupler/Allclean @@ -0,0 +1,10 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +#------------------------------------------------------------------------------ + +# Remove old junk +rm -f comms/OpenFOAM.lock + +rmdir comms + +#------------------------------------------------------------------------------ diff --git a/applications/test/externalFileCoupler/Allrun b/applications/test/externalFileCoupler/Allrun new file mode 100755 index 0000000000..e5557cc158 --- /dev/null +++ b/applications/test/externalFileCoupler/Allrun @@ -0,0 +1,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 + +#------------------------------------------------------------------------------ diff --git a/applications/test/externalFileCoupler/Make/options b/applications/test/externalFileCoupler/Make/options index fa15f12452..54c035b8f5 100644 --- a/applications/test/externalFileCoupler/Make/options +++ b/applications/test/externalFileCoupler/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ - -lfiniteVolume + -lmeshTools diff --git a/applications/test/externalFileCoupler/Test-externalFileCoupler.C b/applications/test/externalFileCoupler/Test-externalFileCoupler.C index c90e766aac..65edbddeb0 100644 --- a/applications/test/externalFileCoupler/Test-externalFileCoupler.C +++ b/applications/test/externalFileCoupler/Test-externalFileCoupler.C @@ -28,6 +28,7 @@ Application Description Test of master/slave communication etc. + \*---------------------------------------------------------------------------*/ #include "argList.H" @@ -41,55 +42,78 @@ using namespace Foam; int main(int argc, char *argv[]) { + argList::noBanner(); argList::noParallel(); + argList::addOption("sleep", "N", "sleep to add between calls"); argList::addOption("max", "N", "max number of calls (default: 1000)"); argList::addBoolOption("slave", "run as slave"); #include "setRootCase.H" const label maxCount = args.getOrDefault