<commit_before>#! /bin/bash

./slurmCheck.sh

if [ $? -ne 0 ]; then
  #Check failed. 
  exit -1
fi 

PORT=10090
COMMAND="../../build/examples/word_count"
HOSTLIST=$(./getSlurmHostlist.sh | ./formatPort.sh $PORT)
MY_RANK=$(./getSlurmRank.sh)
EX="$COMMAND -r $MY_RANK $HOSTLIST >> $MY_RANK.stdout 2>> $MY_RANK.stderr"
echo "Invoking: $EX"
eval $EX<commit_msg>Added debug option that invokes GDB and prints a backtrace of the first error that occurs.<commit_after>#! /bin/bash

DEBUG=1
PORT=10090
COMMAND="../../build/examples/word_count"

./slurmCheck.sh

if [ $? -ne 0 ]; then
  #Check failed. 
  exit -1
fi 

HOSTLIST=$(./getSlurmHostlist.sh | ./formatPort.sh $PORT)
MY_RANK=$(./getSlurmRank.sh)
EX="$COMMAND -r $MY_RANK $HOSTLIST >> $MY_RANK.stdout 2>> $MY_RANK.stderr"
if [ $DEBUG -eq 1 ]; then
  EX="gdb -q -x ./backtrace --args $EX"
fi
echo "Invoking: $EX"
eval $EX
{'fraction_non_alphanumeric': 0.1806674338319908, 'fraction_numerical': 0.020713463751438434, 'mean_word_length': 3.7282608695652173, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '736307', 'n_tokens_mistral': 359, 'n_tokens_neox': 349, 'n_words': 87}