From 90f434665f8da678ca1f97899ad07bd63d4e70ff Mon Sep 17 00:00:00 2001 From: "Todd A. Oliver" Date: Thu, 18 Jul 2024 10:10:26 -0700 Subject: [PATCH] Make lomach restart test pass with flux For some reason that I don't understand, lomach-flow.test 5 (i.e., "verify consistent serialized restart for Tomboulides with lid-driven cavity with 2 mpi ranks") consistently fails on one of our testing systems that uses flux b/c it thinks that the restart file written by the solver does not exist when the test script attempts to mv the file (the mv on line 133 of this version). This commit, which adds some steps between the tps solve and the mv, appears to avoid the issue. --- test/lomach-flow.test | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/lomach-flow.test b/test/lomach-flow.test index eba58c5b9..9cb23e9db 100755 --- a/test/lomach-flow.test +++ b/test/lomach-flow.test @@ -120,25 +120,32 @@ setup() { } @test "[$TEST] verify consistent serialized restart for Tomboulides with lid-driven cavity with 2 mpi ranks" { + rm -f restart_output-lid*.h5 + # Runs 2 iter on 2 mpi ranks using restartMode = singleFileReadWrite cat $RUNFILE_LID | sed 's/maxIters = 1000/maxIters = 2/' | \ sed 's/outputFreq = 10000/outputFreq = 1/' | \ sed 's/#restartMode = singleFileReadWrite/restartMode = singleFileReadWrite/' > $RUNFILE_LID_MOD - $MPIRUN -n 2 $EXE --runFile $RUNFILE_LID_MOD + run $MPIRUN -n 2 $EXE --runFile $RUNFILE_LID_MOD + [[ ${status} -eq 0 ]] + echo $(ls *.h5) + test -s restart_output-lid.sol.h5 mv restart_output-lid.sol.h5 restart_output-lid.sol.2.h5 # Run 1 iter (from 0 IC) cat $RUNFILE_LID | sed 's/maxIters = 1000/maxIters = 1/' | \ sed 's/outputFreq = 10000/outputFreq = 1/' | sed 's/#restartMode = singleFileReadWrite/restartMode = singleFileReadWrite/' > $RUNFILE_LID_MOD - $MPIRUN -n 2 $EXE --runFile $RUNFILE_LID_MOD + run $MPIRUN -n 2 $EXE --runFile $RUNFILE_LID_MOD + [[ ${status} -eq 0 ]] # Run 1 more (from restart) cat $RUNFILE_LID | sed 's/maxIters = 1000/maxIters = 2/' | \ sed 's/outputFreq = 10000/outputFreq = 1/' | \ sed 's/#enableRestart = True/enableRestart = True/' | \ sed 's/#restartMode = singleFileReadWrite/restartMode = singleFileReadWrite/' > $RUNFILE_LID_MOD - $MPIRUN -n 2 $EXE --runFile $RUNFILE_LID_MOD + run $MPIRUN -n 2 $EXE --runFile $RUNFILE_LID_MOD + [[ ${status} -eq 0 ]] # check solutions are the same! h5diff -r --delta=1e-10 restart_output-lid.sol.h5 restart_output-lid.sol.2.h5