<commit_before># Batch script to run the AIMES SC2014 demo. Before running it, run the setup
# script 'demo_SC2014_setup.sh. Run the demo from a shell with:
#
# . demo_SC2014.sh

# Load the environment variables required when running the demo.
. `which demo_SC2014_env_setup.sh`

# Direct to STDOUT and to the file out.log.
which unbuffer > /dev/null
if test $? = 0; then
  unbuffer demo_SC2014_script.py 2>&1 | tee out.log
else
  demo_SC2014_script.py 2>&1 | tee out.log
fi

# Get some information from the logs.
SESSION_UID=`grep 'created        : UID' out.log | cut -d ' ' -f 13`
RADICAL_PILOT_RESOURCES=`grep 'IDs: ' out.log | cut -d ':' -f 2 | sed 's/^ \(.*\)/\1/'`

# Produce diagrams and statistics for the run.
radicalpilot-stats -m plot,stat -s $SESSION_UID > stats.out 2>/dev/null

# Archive the logs.
tar cfj out.log.bz2 out.log

# Write the body of the e-mail.
cat > description.log <<EOL
AIMES SC2014 Demo

Libraries
---------
Radical pilot: `radicalpilot-version`
Saga python: `sagapython-version`
Radical utils: `python -c "import radical.utils as ru; print ru.version"`

Infrastructure
--------------
Resources: ${RADICAL_PILOT_RESOURCES}
DBURL: ${RADICAL_PILOT_DBURL}

EOL

cat stats_2048.out | sed -e '1,/plotting.../d' >> description.log
<commit_msg>Fix typo in stts filename<commit_after># Batch script to run the AIMES SC2014 demo. Before running it, run the setup
# script 'demo_SC2014_setup.sh. Run the demo from a shell with:
#
# . demo_SC2014.sh

# Load the environment variables required when running the demo.
. `which demo_SC2014_env_setup.sh`

# Direct to STDOUT and to the file out.log.
which unbuffer > /dev/null
if test $? = 0; then
  unbuffer demo_SC2014_script.py 2>&1 | tee out.log
else
  demo_SC2014_script.py 2>&1 | tee out.log
fi

# Get some information from the logs.
SESSION_UID=`grep 'created        : UID' out.log | cut -d ' ' -f 13`
RADICAL_PILOT_RESOURCES=`grep 'IDs: ' out.log | cut -d ':' -f 2 | sed 's/^ \(.*\)/\1/'`

# Produce diagrams and statistics for the run.
radicalpilot-stats -m plot,stat -s $SESSION_UID > stats.out 2>/dev/null

# Archive the logs.
tar cfj out.log.bz2 out.log

# Write the body of the e-mail.
cat > description.log <<EOL
AIMES SC2014 Demo

Libraries
---------
Radical pilot: `radicalpilot-version`
Saga python: `sagapython-version`
Radical utils: `python -c "import radical.utils as ru; print ru.version"`

Infrastructure
--------------
Resources: ${RADICAL_PILOT_RESOURCES}
DBURL: ${RADICAL_PILOT_DBURL}

EOL

cat stats.out | sed -e '1,/plotting.../d' >> description.log

{'fraction_non_alphanumeric': 0.13202357563850686, 'fraction_numerical': 0.033005893909626716, 'mean_word_length': 3.5222024866785078, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, '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': '2050838', 'n_tokens_mistral': 1000, 'n_tokens_neox': 913, 'n_words': 300}