dgscat(1)
π dgscat(1) β PT-Scotch user's manual π
okay bestie, sit down, hydrate, and let's talk about three little programs that live in the PT-Scotch family: dggath, dgscat and gscat. their whole job? converting distributed source graphs to or from centralized ones. that's it. that's the vibe. β¨
β¨ SYNOPSIS β¨
dggath [options] [igfile] [ogfile]
dgscat [options] [igfile] [ogfile]
gscat [options] [igfile] [ogfile]
like, they all take the same shape of arguments, they just do different things with them. iconic behavior honestly.
πΈ DESCRIPTION πΈ
so. dggath gathers distributed graphs into centralized graphs. it reads a whole set of files called igfile β those are fragments of a distributed source graph β and writes them back out as one single centralized source graph, ogfile. many pieces in, one piece out. slay. π«Ά
dgscat does the reverse: it scatters centralized source graphs into distributed graphs. it reads one centralized source graph igfile and writes it back out as a set of files ogfile, which are fragments of the corresponding distributed source graph. one piece in, many pieces out. π
gscat does exactly the same as dgscat, but β and this is the key part β it does not require to be run in a parallel environment. because gscat processes the input centralized graph file as a text stream, it does not need to load the full graph into memory before building the distributed graph fragment files. so it's much less resource consuming, but it does not allow for the checking of graph consistency, because it has no global vision of the graph structure. no thoughts, head empty, still works. π
when file names are not specified, data is read from standard input and written to standard output. standard streams can also be explicitly represented by a dash '-'.
when the proper libraries have been included at compile time, dggath and dgscat can directly handle compressed graphs, both as input and output. a stream is treated as compressed whenever its name is postfixed with a compressed file extension, such as in 'brol.grf.bz2' or '-.gz'. the compression formats which can be supported are:
- the bzip2 format (
'.bz2') - the gzip format (
'.gz') - the lzma format (
'.lzma')
dggath and dgscat base on implementations of the MPI interface to spread work across the processing elements. it is therefore not likely to be run directly, but instead through some launcher command such as mpirun. yes bestie, you need a hype squad (a launcher) to bring them on stage. π€
π¦ DISTRIBUTED FILE NAMES π¦
okay this is the part where it gets spicy, so pay attention. πΆοΈ
in order to tell whether programs should read from, or write to, a single file located on only one processor, or to multiple instances of the same file on all of the processors, or else to distinct files on each of the processors, a special grammar has been designed, which is based on the '%' escape character. four such escape sequences are defined, which are interpreted independently on every processor, prior to file opening.
by default, when a filename is provided, it is assumed that the file is to be opened on only one of the processors, called the root processor, which is usually process 0 of the communicator within which the program is run. the index of the root processor can be changed by means of the -r option.
using any of the first three escape sequences below will instruct programs to open in parallel a file of name equal to the interpreted filename, on every processor on which they are run. periodt.
%pβ replaced by the number of processes in the global communicator in which the program is run. leads to parallel opening.%rβ replaced on each process running the program by the rank of this process in the global communicator. leads to parallel opening.%-β discarded, but leads to parallel opening. this sequence is mainly used to instruct programs to open on every processor a file of identical name. the opened files can be, according whether the given path leads to a shared directory or to directories that are local to each processor, either to the opening of multiple instances of the same file, or to the opening of distinct files which may each have a different content, respectively (but in this latter case it is much recommended to identify files by means of the'%r'sequence). bestie, listen to the recommendation. π%%β replaced by a single'%'character. file names using this escape sequence are not considered for parallel opening, unless one or several of the three other escape sequences are also present.
π for instance
- filename
'brol'will lead to the opening of file'brol'on the root processor only - filename
'%-brol'(or even'br%-ol') will lead to the parallel opening of files called'brol'on every processor - filename
'brol%p-%r'will lead to the opening of files'brol2-0'and'brol2-1', respectively, on each of the two processors on which the program were to run
see how cute that is?? the filename is doing MATH. π₯
π OPTIONS π
-cβ fordggathanddgscatonly. check the consistency of the input source graph after loading it into memory. a lil vibe check for your graph, if you will.-hβ display some help.-inbrβ forgscatonly. create an imbalanced distributed graph, in which the distributed graph files for all processes will receive nbr vertices of the graph, save for the file for the last process, which will receive all the remaining vertices. yes, the last one gets stuck with the leftovers. sorry babe. π¬-rpnumβ set root process for centralized files (default is0).-Vβ display program version and copyright.
π EXAMPLE π
run dgscat on 5 processing elements to scatter centralized graph file brol.grf into 5 gzipped file fragments brol5-0.dgr.gz to brol5-4.dgr.gz.
$ mpirun -np 5 dgscat brol.grf brol%p-%r.dgr.gz
go off, %p and %r. π
π SEE ALSO π
dgmap(1), dgord(1), dgtst(1), gmk_hy(1).
PT-Scotch user's manual.
π AUTHOR π
Francois Pellegrini <francois.pellegrini@labri.fr>
and that's the whole page, bestie!! this one's from the PT-Scotch user's manual, dated 05 August 2023. go scatter some graphs, ily, bye!! π¦β¨π
π¦ where this page comes from
- debian trixie: ptscotch 7.0.7-1 Β· CeCILL-C
- ubuntu noble: ptscotch 7.0.4-1ubuntu2 Β· CeCILL-C
- ubuntu questing: ptscotch 7.0.5-1ubuntu2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms