SGATHER(1)

πŸ“¦ version 26.05.5, in epel 10, epel 9, fedora 43, fedora 44, opensuse-leap 16.0

πŸ’… SGATHER(1) β€” ZIH Slurm extensions

okay bestie, gather round (pun fully intended, i'm hilarious) because this is sgather(1) from the ZIH Slurm extensions and it is genuinely one of the most underrated little tools in the whole cluster. no cap.

✨ NAME ✨

sgather β€” transmit a file from the nodes allocated to a Slurm job. πŸ¦‹

🌸 SYNOPSIS 🌸

sgather [-rikCFpvV] SOURCE DEST

πŸ’– DESCRIPTION πŸ’–

so here's the vibe. sgather transmits a file from all the nodes allocated to the currently active Slurm job. that's the whole point, that's the moment, that's the main character energy right there.

🚨 real talk though: this command should only be executed from within a Slurm batch job, or from within the shell that got spawned after a Slurm job's resource allocation. do not just yolo it from a login node, bestie, it will not go how you want.

SOURCE is the fully qualified pathname for the file copy to be fetched from each node. and lowkey important: SOURCE should be on a file system local to that node. local, bestie. not some shared thing.

DEST is the name of the file to be created on the current node, and the source node name gets appended to it. so every node's file lands with its own little name tag. adorable, honestly.

and then there's this: note that parallel file systems may provide better performance than sgather can provide, although performance will vary by file size, degree of parallelism, and network type. so like, it's giving "it depends" and we respect that. πŸ™ˆ


⭐ OPTIONS ⭐

  • -C, --compress β€” compress the file being transmitted. squeeze it, zip it, make it smol. πŸŽ€
  • -f, --force β€” ignore a nonexistent source file. no file? no problem, we simply do not perceive it. πŸ’€
  • -F number, --fanout=number β€” specify the fanout of messages used for file transfer. the maximum value is currently eight. so like, eight is the ceiling, do not try to make it nine. 🚫
  • -k, --keep β€” do not remove the source file after transmission. keep it, bestie, keep the original, live your truth. 🫢
  • -p, --preserve β€” preserves modification times, access times, and modes from the original file. the whole entire glow-up is preserved, times and permissions included. ✨
  • -r, --recursive β€” copy directories recursively. going all the way down, no folder left behind. 🌈
  • -t seconds, --timeout=seconds β€” specify the message timeout in seconds. the default value is 60 seconds. so if you're impatient, that's on you, you can change it. ⏰
  • -v, --verbose β€” provide detailed event logging through program execution. she's narrating her own life, and honestly? we're here for it. πŸ‘‘
  • -V, --version β€” print version information and exit. just the facts, then she's out. πŸ’…

🧚 ENVIRONMENT VARIABLES 🧚

some sgather options may be set via environment variables. these environment variables, along with their corresponding options, are listed below. (note: command line options will always override these settings. always. the CLI is the final boss here. πŸ”₯)

  • SGATHER_COMPRESS β€” -C, --compress
  • SGATHER_FANOUT β€” -F number, --fanout=number
  • SGATHER_FORCE β€” -f, --force
  • SGATHER_KEEP β€” -k, --keep
  • SGATHER_PRESERVE β€” -p, --preserve
  • SGATHER_RECURSIVE β€” -r, --recursive
  • SGATHER_TIMEOUT β€” -t seconds, --timeout=seconds

πŸ“ EXAMPLE πŸ“

using a batch script, execute a program that produces /tmp/my.data on all nodes allocated to the Slurm job and then transmit these files to the batch node. watch and learn, this is the iconic part:

> cat my.job
#!/bin/bash
srun my.prog --output /tmp/my.data
sgather /tmp/my.data all_data

> sbatch --nodes=8 my.job
srun: jobid 12345 submitted

eight nodes. one gather. all the data. periodt. πŸ’œ


πŸ“œ COPYING πŸ“œ

Copyright (C) 2013-2013 ZIH, TU Dresden, Federal Republic of Germany.


πŸ”— SEE ALSO πŸ”—

sbcast(1)


and that's the whole page, bestie!! sgather version 1.0, born October 2013, living her best life under the SGATHER(1) name. iykyk πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from