<commit_before>#!/bin/zsh

# Copyright 2013 University of Chicago and Argonne National Laboratory
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License

# TURBINE-SLURM-RUN
# Creates a SLURM run file and runs it on the given program

# USAGE
# > VAR1=VALUE1 VAR2=VALUE2 turbine-slurm-run.zsh <PROGRAM> <ARGS>*

# ENVIRONMENT
# NODES: Number of nodes to use
# PPN:   Processes-per-node

PROGRAM=$1

TURBINE=$( which turbine )
if [[ ${?} != 0 ]]
then
  print "Could not find Turbine in PATH!"
  return 1
fi

export TURBINE_HOME=$( cd $(dirname ${TURBINE})/.. ; /bin/pwd )
declare TURBINE_HOME
source ${TURBINE_HOME}/scripts/helpers.zsh
if [[ ${?} != 0 ]]
then
  print "Broken Turbine installation!"
  declare TURBINE_HOME
  return 1
fi

checkvars PROGRAM NODES PPN
declare   PROGRAM NODES PPN
export    PROGRAM NODES PPN

setup-turbine-slurm.zsh
exitcode "setup-turbine-slurm failed!"

sbatch --exclusive --constraint=ib ./turbine-slurm.sh ${PROGRAM}
<commit_msg>Add TODO<commit_after>#!/bin/zsh

# Copyright 2013 University of Chicago and Argonne National Laboratory
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License

# TURBINE-SLURM-RUN
# Creates a SLURM run file and runs it on the given program

# USAGE
# > VAR1=VALUE1 VAR2=VALUE2 turbine-slurm-run.zsh <PROGRAM> <ARGS>*

# ENVIRONMENT
# TODO: User input should be PROCS, not NODES (#648)
# NODES: Number of nodes to use
# PPN:   Processes-per-node

PROGRAM=$1

TURBINE=$( which turbine )
if [[ ${?} != 0 ]]
then
  print "Could not find Turbine in PATH!"
  return 1
fi

export TURBINE_HOME=$( cd $(dirname ${TURBINE})/.. ; /bin/pwd )
declare TURBINE_HOME
source ${TURBINE_HOME}/scripts/helpers.zsh
if [[ ${?} != 0 ]]
then
  print "Broken Turbine installation!"
  declare TURBINE_HOME
  return 1
fi

checkvars PROGRAM NODES PPN
declare   PROGRAM NODES PPN
export    PROGRAM NODES PPN

setup-turbine-slurm.zsh
exitcode "setup-turbine-slurm failed!"

sbatch --exclusive --constraint=ib ./turbine-slurm.sh ${PROGRAM}

{'fraction_non_alphanumeric': 0.0975609756097561, 'fraction_numerical': 0.012533875338753388, 'mean_word_length': 4.1625874125874125, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5992988', 'n_tokens_mistral': 1011, 'n_tokens_neox': 964, 'n_words': 362}