SGATHER(1)
π 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 is60seconds. 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,--compressSGATHER_FANOUTβ-F number,--fanout=numberSGATHER_FORCEβ-f,--forceSGATHER_KEEPβ-k,--keepSGATHER_PRESERVEβ-p,--preserveSGATHER_RECURSIVEβ-r,--recursiveSGATHER_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 π
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
- epel 10: slurm-contribs 26.05.5-1.el10_3 Β· GPL-2.0-or-later AND BSD-2-Clause AND BSD-1-Clause
- epel 9: slurm-contribs 22.05.11-2.el9 Β· GPL-2.0-or-later AND BSD-2-Clause AND BSD-1-Clause
- fedora 43: slurm-contribs 24.05.2-5.fc43 Β· GPL-2.0-or-later AND BSD-2-Clause AND BSD-1-Clause
- fedora 44: slurm-contribs 24.05.2-6.fc44 Β· GPL-2.0-or-later AND BSD-2-Clause AND BSD-1-Clause
- opensuse-leap 16.0: slurm 24.11.3-bp160.1.8 Β· SUSE-GPL-2.0-with-openssl-exception
- opensuse-leap 16.0: slurm 24.11.3-bp160.1.8 Β· SUSE-GPL-2.0-with-openssl-exception
- opensuse-leap 16.0: slurm 24.11.3-bp160.1.8 Β· SUSE-GPL-2.0-with-openssl-exception
- opensuse-leap 16.0: slurm 24.11.3-bp160.1.8 Β· SUSE-GPL-2.0-with-openssl-exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms