Skip to content

Commit c2fe1c9

Browse files
authored
Merge pull request #159 from daavid00/dev
Bash files to check paper and docs outputs
2 parents a14fe18 + 01e8c46 commit c2fe1c9

3 files changed

Lines changed: 90 additions & 10 deletions

File tree

tests/scripts/docs_all.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ wait
66
. tests/scripts/docs_cp_grids.sh &
77
. tests/scripts/docs_localized_lower_domain.sh &
88
wait
9+
10+
. tests/scripts/docs_check_outputs.sh
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
files=(
2+
"test_outputs/docs_localized_lower_domain/lower_domain_pvtnum-1-satnum_i,14,k_t5.png"
3+
"test_outputs/docs_via_deck_hello_world/spe11b_performance.png"
4+
"test_outputs/docs_via_deck_hello_world/spe11b_tco2_2Dmaps.png"
5+
"test_outputs/docs_via_deck_hello_world/spe11b_performance_detailed.png"
6+
"test_outputs/docs_via_deck_hello_world/spe11b_time_series_csv.png"
7+
"test_outputs/docs_via_deck_hello_world/spe11b_sparse_data.png"
8+
"test_outputs/docs_via_deck_hello_world/isothermal_sgas_i,1,k_t5.png"
9+
"test_outputs/docs_cp_grids/11_levels_dz_i,1,k_t5.png"
10+
)
11+
12+
missing_file="test_outputs/missing_docs_files.txt"
13+
missing=0
14+
15+
rm -f "$missing_file"
16+
17+
for f in "${files[@]}"; do
18+
if [[ ! -f "$f" ]]; then
19+
echo "$f" >> "$missing_file"
20+
((missing++))
21+
fi
22+
done
23+
24+
if (( missing == 0 )); then
25+
echo "All figures and files exist."
26+
else
27+
echo "$missing figure(s) or file(s) missing."
28+
echo "See $missing_file"
29+
fi

tests/scripts/paper_convergence.sh

Lines changed: 59 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,61 @@
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
118
python3 convergence.py
129
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

Comments
 (0)