<commit_before>#!/bin/sh

set -x

if [ -z "$HIMAN" ]; then
	export HIMAN="../../himan"
fi

rm -f DD-D*.grib FF-MS*.grib DF-MS*.grib

$HIMAN -d 5 -f windvector_hl_regular.json -t grib hl_regular_source.grib --no-cuda

grib_compare -A 0.01 hl_regular_result_FF.grib ./FF-MS_height_10_rll_1030_816_0_006.grib

if [ $? -eq 0 ];then
  echo windvector/hirlam regular grid wind speed success on CPU
else
  echo windvector/hirlam regular grid wind speed failed on CPU
  exit 1
fi

grib_compare -A 0.01 hl_regular_result_DD.grib ./DD-D_height_10_rll_1030_816_0_006.grib

if [ $? -eq 0 ];then
  echo windvector/hirlam regular grid wind direction success!
else
  echo windvector/hirlam regular grid wind direction failed
  exit 1
fi

if [ $(/sbin/lsmod | egrep -c "^nvidia") -gt 0 ]; then

  mv ./FF-MS_height_10_rll_1030_816_0_006.grib ./FF-MS_height_10_rll_1030_816_0_006-CPU.grib
  mv ./DD-D_height_10_rll_1030_816_0_006.grib ./DD-D_height_10_rll_1030_816_0_006-CPU.grib

  $HIMAN -d 5 -f windvector_hl_regular.json -t grib hl_regular_source.grib

  grib_compare -b referenceValue -A 0.01 hl_regular_result_FF.grib ./FF-MS_height_10_rll_1030_816_0_006.grib

  if [ $? -eq 0 ];then
    echo windvector/hirlam regular grid wind speed success GPU
  else
    echo windvector/hirlam regular grid wind speed failed GPU
    exit 1
  fi

  grib_compare -A 0.01 hl_regular_result_DD.grib ./DD-D_height_10_rll_1030_816_0_006.grib

  if [ $? -eq 0 ];then
    echo windvector/hirlam regular grid wind direction success GPU
  else
    echo windvector/hirlam regular grid wind direction failed GPU
    exit 1
fi


fi


$HIMAN -d 5 -f windvector_hl_staggered.json -t grib hl_staggered_source.grib --no-cuda

grib_compare -A 0.01 hl_staggered_result_FF.grib ./FF-MS_height_10_rll_1030_816_0_044.grib

if [ $? -eq 0 ];then
  echo windvector/hirlam regular grid wind speed success!
else
  echo windvector/hirlam regular grid wind speed failed
  exit 1
fi

grib_compare -A 0.01 hl_regular_result_DD.grib ./DD-D_height_10_rll_1030_816_0_044.grib

if [ $? -eq 0 ];then
  echo windvector/hirlam regular grid wind direction success!
else
  echo windvector/hirlam regular grid wind direction failed
  exit 1
fi
<commit_msg>fix file names<commit_after>#!/bin/sh

set -x

if [ -z "$HIMAN" ]; then
	export HIMAN="../../himan"
fi

rm -f DD-D*.grib FF-MS*.grib DF-MS*.grib

$HIMAN -d 5 -f windvector_hl_regular.json -t grib hl_regular_source.grib -s hl_reg_nocuda --no-cuda

grib_compare -A 0.01 hl_regular_result_FF.grib ./FF-MS_height_10_rll_1030_816_0_006.grib

if [ $? -eq 0 ];then
  echo windvector/hirlam regular grid wind speed success on CPU
else
  echo windvector/hirlam regular grid wind speed failed on CPU
  exit 1
fi

grib_compare -A 0.01 hl_regular_result_DD.grib ./DD-D_height_10_rll_1030_816_0_006.grib

if [ $? -eq 0 ];then
  echo windvector/hirlam regular grid wind direction success!
else
  echo windvector/hirlam regular grid wind direction failed
  exit 1
fi

if [ $(/sbin/lsmod | egrep -c "^nvidia") -gt 0 ]; then

  mv ./FF-MS_height_10_rll_1030_816_0_006.grib ./FF-MS_height_10_rll_1030_816_0_006-CPU.grib
  mv ./DD-D_height_10_rll_1030_816_0_006.grib ./DD-D_height_10_rll_1030_816_0_006-CPU.grib

  $HIMAN -d 5 -f windvector_hl_regular.json -t grib -s hl_reg_cuda hl_regular_source.grib

  grib_compare -b referenceValue -A 0.01 hl_regular_result_FF.grib ./FF-MS_height_10_rll_1030_816_0_006.grib

  if [ $? -eq 0 ];then
    echo windvector/hirlam regular grid wind speed success GPU
  else
    echo windvector/hirlam regular grid wind speed failed GPU
    exit 1
  fi

  grib_compare -A 0.01 hl_regular_result_DD.grib ./DD-D_height_10_rll_1030_816_0_006.grib

  if [ $? -eq 0 ];then
    echo windvector/hirlam regular grid wind direction success GPU
  else
    echo windvector/hirlam regular grid wind direction failed GPU
    exit 1
fi
fi

$HIMAN -d 5 -f windvector_hl_staggered.json -t grib hl_staggered_source.grib --no-cuda -s hl_stag_nocuda

grib_compare -A 0.01 hl_staggered_result_FF.grib ./FF-MS_hybrid_55_polster_290_225_0_025.grib

if [ $? -eq 0 ];then
  echo windvector/hirlam staggered grid wind speed success!
else
  echo windvector/hirlam staggered grid wind speed failed
  exit 1
fi

grib_compare -A 0.01 hl_staggered_result_DD.grib ./DD-D_hybrid_55_polster_290_225_0_025.grib

if [ $? -eq 0 ];then
  echo windvector/hirlam staggered grid wind direction success!
else
  echo windvector/hirlam staggered grid wind direction failed
  exit 1
fi

{'fraction_non_alphanumeric': 0.08344579397210976, 'fraction_numerical': 0.07332433648223122, 'mean_word_length': 3.8075675675675678, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4883008', 'n_tokens_mistral': 2020, 'n_tokens_neox': 1787, 'n_words': 464}