<commit_before>#!/bin/bash

set -e

# serial multigrid parameters study on fixed-size problem (4x10^6 or 10^6
# degrees freedom):
#     -pc_mg_levels             <REFINE|REFINE-2|...|3>
#     -pc_mg_cycle_type         <v|w>
#     -mg_levels_ksp_type       <chebyshev|cg|richardson>   WHICH SMOOTHER?
#     -mg_levels_ksp_max_it     <1|2|3>                     HOW MANY SMOOTHINGS (UP AND DOWN)

# use PETSC_ARCH with --with-debugging=0
# run as:
#    $ ./mgserialstudy.sh &> study.txt

REFINE=10 # or =9

for (( MGLEV=$REFINE; MGLEV>2; MGLEV-=2 )); do
    for MGVW in v w; do
        for MGSMOOTHTYPE in chebyshev cg richardson; do
            for MGSMOOTHIT in 1 2 3; do
                echo "case:  -pc_mg_levels $MGLEV -pc_mg_cycle_type $MGVW -mg_levels_ksp_type $MGSMOOTHTYPE -mg_levels_ksp_max_it $MGSMOOTHIT"
                /usr/bin/time --portability -f "real %e" ./fish2 -ksp_type cg -pc_type mg -da_refine $REFINE -ksp_converged_reason -pc_mg_levels $MGLEV -pc_mg_cycle_type $MGVW -mg_levels_ksp_type $MGSMOOTHTYPE -mg_levels_ksp_max_it $MGSMOOTHIT
            done
        done
    done
done
<commit_msg>fully-solve the linear problem instead of causing Newton iterations: -ksp_rtol 1.0e-12<commit_after>#!/bin/bash

set -e

# serial multigrid parameters study on fixed-size problem (4x10^6 or 10^6
# degrees freedom):
#     -pc_mg_levels             <REFINE|REFINE-2|...|3>
#     -pc_mg_cycle_type         <v|w>
#     -mg_levels_ksp_type       <chebyshev|cg|richardson>   WHICH SMOOTHER?
#     -mg_levels_ksp_max_it     <1|2|3>                     HOW MANY SMOOTHINGS (UP AND DOWN)

# use PETSC_ARCH with --with-debugging=0
# run as:
#    $ ./mgserialstudy.sh &> study.txt

REFINE=10 # or =9

for (( MGLEV=$REFINE; MGLEV>2; MGLEV-=2 )); do
    for MGVW in v w; do
        for MGSMOOTHTYPE in chebyshev cg richardson; do
            for MGSMOOTHIT in 1 2 3; do
                echo "case:  -pc_mg_levels $MGLEV -pc_mg_cycle_type $MGVW -mg_levels_ksp_type $MGSMOOTHTYPE -mg_levels_ksp_max_it $MGSMOOTHIT"
                /usr/bin/time --portability -f "real %e" ./fish2 -ksp_type cg -pc_type mg -da_refine $REFINE -ksp_rtol 1.0e-12 -ksp_converged_reason -pc_mg_levels $MGLEV -pc_mg_cycle_type $MGVW -mg_levels_ksp_type $MGSMOOTHTYPE -mg_levels_ksp_max_it $MGSMOOTHIT
            done
        done
    done
done

{'fraction_non_alphanumeric': 0.1025420077552779, 'fraction_numerical': 0.02240413614821198, 'mean_word_length': 2.5944272445820435, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3674734', 'n_tokens_mistral': 1020, 'n_tokens_neox': 936, 'n_words': 216}