|
1 | | -WHR="test_outputs/paper_convergence" |
2 | | -if [ ! -d "test_outputs" ]; then |
3 | | - mkdir "test_outputs" |
4 | | -fi |
5 | | -if [ -d $WHR ]; then |
6 | | - rm -rf $WHR |
7 | | -fi |
8 | | -mkdir $WHR |
9 | | -cp -r convergence/. $WHR |
10 | | -cd $WHR |
| 1 | +NCPUS=${1:-16} |
| 2 | +OUT="test_outputs/paper_convergence" |
| 3 | +. tests/scripts/initialize_output_folders.sh $OUT |
| 4 | +. tests/scripts/get_plopm.sh |
| 5 | +cp -r convergence/. $OUT |
| 6 | +sed -i.bak "s/mpirun -np 8 flow --/mpirun -np $NCPUS flow --partition-method=metis --edge-weights-method=logtrans --/g" $OUT/spe11b.mako && rm -f $OUT/spe11b.mako.bak |
| 7 | +cd $OUT |
11 | 8 | python3 convergence.py |
12 | 9 | cd ../.. |
| 10 | + |
| 11 | +files=( |
| 12 | + "test_outputs/paper_convergence/full_p1.png" |
| 13 | + "test_outputs/paper_convergence/full_tlinsol.png" |
| 14 | + "test_outputs/paper_convergence/full_immB.png" |
| 15 | + "test_outputs/paper_convergence/full_p2.png" |
| 16 | + "test_outputs/paper_convergence/full_immA.png" |
| 17 | + "test_outputs/paper_convergence/full_spatial_map_full_cp0-z40mish-x40m.png" |
| 18 | + "test_outputs/paper_convergence/full_mobA_adding_participants.png" |
| 19 | + "test_outputs/paper_convergence/full_spatial_map_full_cp2-z10mish-x10m.png" |
| 20 | + "test_outputs/paper_convergence/full_spatial_map_adding_participants.png" |
| 21 | + "test_outputs/paper_convergence/full_sealTot.png" |
| 22 | + "test_outputs/paper_convergence/full_nliter.png" |
| 23 | + "test_outputs/paper_convergence/full_nres.png" |
| 24 | + "test_outputs/paper_convergence/full_liniter.png" |
| 25 | + "test_outputs/paper_convergence/full_sealA.png" |
| 26 | + "test_outputs/paper_convergence/full_sealB.png" |
| 27 | + "test_outputs/paper_convergence/full_runtime.png" |
| 28 | + "test_outputs/paper_convergence/full_spatial_map_full_cp3-z5mish-x5m.png" |
| 29 | + "test_outputs/paper_convergence/full_dof.png" |
| 30 | + "test_outputs/paper_convergence/full_boundTot.png" |
| 31 | + "test_outputs/paper_convergence/full_mobA.png" |
| 32 | + "test_outputs/paper_convergence/full_fsteps.png" |
| 33 | + "test_outputs/paper_convergence/full_tcpu.png" |
| 34 | + "test_outputs/paper_convergence/full_mobB.png" |
| 35 | + "test_outputs/paper_convergence/full_spatial_map_full_cp1-z20mish-x20m.png" |
| 36 | + "test_outputs/paper_convergence/full_MC.png" |
| 37 | + "test_outputs/paper_convergence/full_tstep.png" |
| 38 | + "test_outputs/paper_convergence/full_spatial_map_all.png" |
| 39 | + "test_outputs/paper_convergence/full_dissB.png" |
| 40 | + "test_outputs/paper_convergence/full_mass.png" |
| 41 | + "test_outputs/paper_convergence/full_dissA.png" |
| 42 | +) |
| 43 | + |
| 44 | +missing_file="test_outputs/missing_publication_files.txt" |
| 45 | +missing=0 |
| 46 | + |
| 47 | +rm -f "$missing_file" |
| 48 | + |
| 49 | +for f in "${files[@]}"; do |
| 50 | + if [[ ! -f "$f" ]]; then |
| 51 | + echo "$f" >> "$missing_file" |
| 52 | + ((missing++)) |
| 53 | + fi |
| 54 | +done |
| 55 | + |
| 56 | +if (( missing == 0 )); then |
| 57 | + echo "All figures and files exist." |
| 58 | +else |
| 59 | + echo "$missing figure(s) or file(s) missing." |
| 60 | + echo "See $missing_file" |
| 61 | +fi |
0 commit comments