<commit_before>### SHELL> mpiexec -np 4 Rscript --vanilla [...].r

suppressMessages(library(pbdMPI, quietly = TRUE))
init()
.comm.size <- comm.size()
.comm.rank <- comm.rank()

N <- 5
x <- (1:N) + N * .comm.rank

if(.comm.rank == 0){
  send(list(x))
} else if(.comm.rank == 1){
  y <- recv()
}
comm.print(y, rank.print = 1)

if(.comm.rank == 0){
  send(as.integer(x), rank.dest = 2)
} else if(.comm.rank == 2){
  y <- recv()
}
comm.print(y, rank.print = 2)

if(.comm.rank == 0){
  send(as.double(x), rank.dest = 3)
} else if(.comm.rank == 3){
  y <- recv()
}
comm.print(y, rank.print = 3)

xx <- as.raw(x)
comm.print(xx, rank.print = 0)
if(.comm.rank == 0){
  send(xx)
  send(xx)
} else if(.comm.rank == 1){
  y <- recv(unserialize.raw = FALSE)
  z <- recv(xx)
}
comm.print(y, rank.print = 1)
comm.print(z, rank.print = 1)

xx <- serialize(x, NULL)
comm.print(xx, rank.print = 0)
if(.comm.rank == 0){
  send(xx)
} else if(.comm.rank == 1){
  y <- recv()
}
comm.print(y, rank.print = 1)

finalize()
<commit_msg>Fix 02_lazy<commit_after>### SHELL> mpiexec -np 4 Rscript --vanilla [...].r

suppressMessages(library(pbdMPI, quietly = TRUE))
init()
.comm.size <- comm.size()
.comm.rank <- comm.rank()

N <- 5
x <- (1:N) + N * .comm.rank

if(.comm.rank == 0){
  send(list(x))
} else if(.comm.rank == 1){
  y <- recv()
}
comm.print(y, rank.print = 1)

if(.comm.rank == 0){
  send(as.integer(x), rank.dest = 2)
} else if(.comm.rank == 2){
  y <- recv()
}
comm.print(y, rank.print = 2)

if(.comm.rank == 0){
  send(as.double(x), rank.dest = 3)
} else if(.comm.rank == 3){
  y <- recv()
}
comm.print(y, rank.print = 3)

xx <- as.raw(x)
comm.print(xx, rank.print = 0)
if(.comm.rank == 0){
  send(xx)
  send(xx)
} else if(.comm.rank == 1){
  y <- recv()
  z <- recv(xx)
}
comm.print(y, rank.print = 1)
comm.print(z, rank.print = 1)

xx <- serialize(x, NULL)
comm.print(xx, rank.print = 0)
if(.comm.rank == 0){
  send(xx)
} else if(.comm.rank == 1){
  y <- recv()
}
comm.print(y, rank.print = 1)

finalize()

{'fraction_non_alphanumeric': 0.24060150375939848, 'fraction_numerical': 0.02406015037593985, 'mean_word_length': 3.04868154158215, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 5, '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': '3938197', 'n_tokens_mistral': 970, 'n_tokens_neox': 879, 'n_words': 200}