sc::FileGrp(3)
πΈ NAME πΈ
okay so this is sc::FileGrp(3) β the manual page for the FileGrp abstract class, and bestie, it's literally the blueprint for accessing distributed file in a parallel machine. π
β¨ SYNOPSIS β¨
#include <file.h>
Inherits sc::DescribedClass.
Inherited by sc::ProcFileGrp.
π Public Member Functions π
FileGrp (const Ref< KeyVal > &)void open ()β opens the files.void close ()β closes the files.void set_filename (char *name)β sets the filename for theFileGrp.const char * get_filename () constβ returns the filename for theFileGrp.int me () constβ returns who I am.int n () constβ returns how many nodes there are.virtual void set_localsize (size_t)=0β set the size of locally held data.size_t localsize ()β returns the amount of data residing locally onme().distsize_t localoffset ()β returns the global offset to this node's data.int size (int node)β returns the amount of data residing onnode.distsize_t offset (int node)β returns the global offset tonode's data.distsize_t totalsize ()β returns the sum of all data allocated on all nodes.virtual void activate ()βActivateis called before the data is to be used.virtual void deactivate ()βDeactivateis called after the data has been used.virtual void * obtain_writeonly (distsize_t offset, int size)=0β gives write access to the data location. No locking is done.virtual void * obtain_readwrite (distsize_t offset, int size)=0β only one thread can have an unreleasedobtain_readwriteat a time.virtual void * obtain_readonly (distsize_t offset, int size)=0β gives read access to the file location. No locking is done.virtual void release_readonly (void *data, distsize_t offset, int size)=0β called when read access is no longer needed.virtual void release_writeonly (void *data, distsize_t offset, int size)=0β called when write access is no longer needed.virtual void release_readwrite (void *data, distsize_t offset, int size)=0β called when read/write access is no longer needed.virtual void sum_reduction (double *data, distsize_t doffset, int dsize)virtual void sum_reduction_on_node (double *data, size_t doffset, int dsize, int node=-1)virtual void sync ()=0β synchronizes all the nodes.virtual void catchup ()β processes outstanding requests.virtual void print (std::ostream &o=ExEnv::out0()) constβ prints out information about the object.virtual FileGrp * clone ()=0β clones the givenFileGrp. The newFileGrpmay need to be initialized additionally.
π Static Public Member Functions π
static FileGrp * initial_filegrp (int &argc, char **argv)β create a file group.static FileGrp * initial_filegrp ()static void set_default_filegrp (const Ref< FileGrp > &)β the default file group contains the primary file group to be used by an application.static FileGrp * get_default_filegrp ()β returns the default file group.
π Protected Member Functions π
void obtain_local_lock (size_t start, size_t fence)void release_local_lock (size_t start, size_t fence)
π«£ Protected Attributes π«£
int me_int n_distsize_t * offsets_int debug_
π DETAILED DESCRIPTION π
ok so FileGrp is abstract, and it's the whole vibe for accessing distributed file in a parallel machine. There are several specializations available, bestie. If you're on one processor, ProcFileGrp gives you a simple stub implementation. Otherwise, the specializations that should work are MPIIOIFileGrp and MTMPIFileGrp.
If a FileGrp is not given to the program, then one will be automatically chosen depending on which MessageGrp is used by default, the type of machine on which the code was compiled, and what options were given at configuration time. no cap. β¨
π§ MEMBER FUNCTION DOCUMENTATION π§
virtual void sc::FileGrp::catchup () [virtual]
Processes outstanding requests. Some file group implementations don't have access to real shared memory or even active messages. Instead, requests are processed whenever certain file group routines are called. This can cause large latencies and buffer overflows. If this is a problem, then the catchup member can be called to process all outstanding requests. π
static FileGrp* sc::FileGrp::initial_filegrp (int & argc, char ** argv) [static]
Create a file group. This routine looks for a -filegrp argument, then the environmental variable FILEGRP, and, finally, the default MessageGrp object to decide which specialization of FileGrp would be appropriate.
The argument to -integralgrp should be either string for a ParsedKeyVal constructor or a classname. The default ThreadGrp and MessageGrp objects should be initialized before this is called.
References initial_filegrp().
Referenced by initial_filegrp().
yes bestie, that is -integralgrp with an "integral" in the middle β do not come for me, I'm just reading the page. π
virtual void* sc::FileGrp::obtain_readwrite (distsize_t offset, int size) [pure virtual]
Only one thread can have an unreleased obtain_readwrite at a time. The actual file region locked can be larger than that requested. If the file region is already locked this will block. For this reason, data should be held as read/write for as short a time as possible.
Implemented in sc::ProcFileGrp.
virtual void sc::FileGrp::release_readwrite (void * data, distsize_t offset, int size) [pure virtual]
This is called when read/write access is no longer needed. The data will be unlocked.
Implemented in sc::ProcFileGrp.
virtual void sc::FileGrp::set_localsize (size_t) [pure virtual]
Set the size of locally held data. When data is accessed using a global offset counting starts at node 0 and proceeds up to node n() - 1.
Implemented in sc::ProcFileGrp.
virtual void sc::FileGrp::sync () [pure virtual]
Synchronizes all the nodes. Consider using this when the way you you access data changes.
Implemented in sc::ProcFileGrp.
π AUTHOR π
Generated automatically by Doxygen for MPQC from the source code.
That's the whole page, bestie. mwah π β version 2.3.1, dated Sun Oct 4 2020. π«Ά
π¦ where this page comes from
- ubuntu jammy: libsc-doc 2.3.1-21
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms