<commit_before>#! /bin/bash
# TODO: adapt Mosfit's test.sh to properly work around mpich's bug.

set -e -x

function my_mpirun() {
    # Work around bug in mpich mpirun that leaves stdin/stdout
    # with the O_NONBLOCK flag set, which causes problems in various
    # contexts -- but not always, since bash sometimes clears the
    # flag after the program is run.
    mpirun "$@" </dev/null 2>&1 |cat
}

my_mpirun -np 2 python -m mosfit -e SN2009do --test -i 1 -f 1 -p 0 -F covariance

python -m mosfit -e SN2009do.json --test -i 1 --no-fracking -m magnetar \
       -T 2 -F covariance

python -m mosfit -e SN2007bg --test -i 1 --no-fracking -m ic

python -m mosfit -e 09do --test -i 1 --no-fracking -m slsn -S 20 -E 10.0 100.0 \
       -g -c --no-copy-at-launch -x radiusphot

python -m mosfit --test -i 0

python -m mosfit -i 0 -m default -P parameters_test.json

python test.py<commit_msg>recipe/forge_test.sh: cut out a couple more runs<commit_after>#! /bin/bash
# TODO: adapt Mosfit's test.sh to properly work around mpich's bug.

set -e -x

function my_mpirun() {
    # Work around bug in mpich mpirun that leaves stdin/stdout
    # with the O_NONBLOCK flag set, which causes problems in various
    # contexts -- but not always, since bash sometimes clears the
    # flag after the program is run.
    mpirun "$@" </dev/null 2>&1 |cat
}

my_mpirun -np 2 python -m mosfit -e SN2009do --test -i 1 -f 1 -p 0 -F covariance

python -m mosfit -e SN2007bg --test -i 1 --no-fracking -m ic

python -m mosfit --test -i 0

python -m mosfit -i 0 -m default -P parameters_test.json

python test.py
{'fraction_non_alphanumeric': 0.10797237915881984, 'fraction_numerical': 0.032642812303829254, 'mean_word_length': 2.5580357142857144, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6677924', 'n_tokens_mistral': 623, 'n_tokens_neox': 558, 'n_words': 241}