<commit_before>import location;
import assert;
import io;

@dispatch=WORKER
(int rank) f(int i) "turbine" "0.0.1" [
  "set <<rank>> [ adlb::rank ]; after 5"
];


main() {
  int N = 500;
  int target_rank = random_worker();
  location target = location_from_rank(target_rank);

  int actual_ranks[];

  foreach i in [1:N] {
    int actual_rank;
    actual_rank = @soft_location=target f(0);
    actual_ranks[i] = actual_rank;
  }

  // See if any executed on different rank to target
  boolean different_rank;
  for (int i = 1, different_rank = false; i <= N;
       i = i + 1, different_rank = different_rank || differs) {
    boolean differs = target_rank != actual_ranks[i];
  }
  printf("target: %s actual ranks: %s workers %d",
         target_rank, repr(actual_ranks), turbine_workers());

  assert(turbine_workers() == 1 || different_rank,
        "Expected soft targeted to go to idle work");
}<commit_msg>Update test<commit_after>import location;
import assert;
import io;

@dispatch=WORKER
(int rank) f(int i) "turbine" "0.0.1" [
  "set <<rank>> [ adlb::rank ]; after 5"
];


main() {
  int N = 500;
  int target_rank = randomWorkerRank();
  location target = locationFromRank(target_rank);

  int actual_ranks[];

  foreach i in [1:N] {
    int actual_rank;
    actual_rank = @soft_location=target f(0);
    actual_ranks[i] = actual_rank;
  }

  // See if any executed on different rank to target
  boolean different_rank;
  for (int i = 1, different_rank = false; i <= N;
       i = i + 1, different_rank = different_rank || differs) {
    boolean differs = target_rank != actual_ranks[i];
  }
  printf("target: %s actual ranks: %s workers %d",
         target_rank, repr(actual_ranks), turbine_workers());

  assert(turbine_workers() == 1 || different_rank,
        "Expected soft targeted to go to idle work");
}
{'fraction_non_alphanumeric': 0.13150684931506848, 'fraction_numerical': 0.01315068493150685, 'mean_word_length': 3.682051282051282, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '4104555', 'n_tokens_mistral': 642, 'n_tokens_neox': 610, 'n_words': 183}