Skip to content

Commit

Permalink
Documentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Jul 18, 2023
1 parent cb0201b commit 9edff34
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
1 change: 1 addition & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ WRENCH Release Notes
- API change by which a `FileLocation` now includes a `DataFile`.
- Added a CACHING_BEHAVIOR property to StorageService, which can take value "NONE" (the original behavior in which when full the storage service fails on writes) and "LRU" (the storage service implements a Least Recently Used strategy so as to function as a cache).
- Implementation of a File Proxy Service, which acts as a proxy for a file service while maintaining a local cache for files.
- Implementation of a Compound Storage Service, which acts as a proxy for an arbitrary set of Simple Storage Services and performs file striping.
- Implementation of an MPI action, which can be part of any job and makes it possible to simulate message-passing programs implemented with the MPI API. The simulation of the MPI program is handled by the SMPI component is SimGrid, which has proven both accurate and scalable.
- Minor bug fixes and scalability improvements.

Expand Down
13 changes: 13 additions & 0 deletions include/wrench/services/storage/compound/CompoundStorageService.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,27 @@ namespace wrench {
* @brief Structure to tracking disk usage
*/
struct DiskUsage {
/** @brief Storage service */
std::shared_ptr<StorageService> service;
/** @brief Free space in byte */
double free_space;
/** @brief File name */
std::string file_name;
/** @brief Load */
double load;// not actually used so far
};

/**
* @brief Structure for tracing file allocations for each job
*/
struct AllocationTrace {
/** @brief time stamp */
double ts;
/** @brief IO action */
IOAction act;
/** @brief Disk usage */
std::vector<DiskUsage> disk_usage;// new usage stats for updated disks
/** @brief internal file locations */
std::vector<std::shared_ptr<FileLocation>> internal_locations;
};

Expand Down Expand Up @@ -215,10 +223,15 @@ namespace wrench {
const std::shared_ptr<FileLocation> &dst_location);

// Publicly accessible traces... (TODO: cleanup access to traces)
/** @brief File read traces */
std::map<std::string, AllocationTrace> read_traces = {};
/** @brief File write traces */
std::map<std::string, AllocationTrace> write_traces = {};
/** @brief File copy traces */
std::map<std::string, AllocationTrace> copy_traces = {};
/** @brief File delete traces */
std::map<std::string, AllocationTrace> delete_traces = {};
/** @brief Internal storage use */
std::vector<std::pair<double, AllocationTrace>> internal_storage_use = {};

/***********************/
Expand Down
18 changes: 14 additions & 4 deletions src/wrench/services/storage/compound/CompoundStorageService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ namespace wrench {
* @brief Lookup for a DataFile in the internal file mapping of the CompoundStorageService (a simplified FileRegistry)
*
* @param file: the file of interest
* @param answer_mailbox: the answer mailbox
* @param answer_mailbox: the answer mailbox to which the reply from the server should be sent
*
* @return A vector of shared_ptr on a FileLocation if the DataFile is known to the CompoundStorageService or empty vector if it's not.
*/
Expand Down Expand Up @@ -404,7 +404,8 @@ namespace wrench {
* try to allocate the file on one of the underlying storage services, using the user-provided 'storage_selection'
* callback.
*
* @param file the file of interest
* @param file: the file of interest
* @param answer_mailbox: the answer mailbox to which the reply from the server should be sent
*
* @return A vector of shared_ptr on a FileLocation if the DataFile is known to the CompoundStorageService or could be allocated
* or empty vector if it's not / could not be allocated.
Expand Down Expand Up @@ -563,6 +564,12 @@ namespace wrench {
return available;
}

/**
* @brief Synchronously copy a file
*
* @param src_location: the source location
* @param dst_location: the destination location
*/
void CompoundStorageService::copyFile(const std::shared_ptr<FileLocation> &src_location,
const std::shared_ptr<FileLocation> &dst_location) {

Expand Down Expand Up @@ -607,6 +614,9 @@ namespace wrench {
/**
* @brief Copy file from css to a simple storage service (file might be stripped within the CSS, but should be
* reassembled on the SSS)
*
* @param src_location: the source location
* @param dst_location: the destination location
*
*/
void CompoundStorageService::copyFileIamSource(const std::shared_ptr<FileLocation> &src_location,
Expand Down Expand Up @@ -873,7 +883,7 @@ namespace wrench {
/**
* @brief Synchronously write a file to the storage service
*
* @param answer_mailbox: the mailbox on which to expect the answer
* @param answer_mailbox: the answer mailbox to which the reply from the server should be sent
* @param location: the location
* @param wait_for_answer: whether to wait for the answer
*
Expand Down Expand Up @@ -983,7 +993,7 @@ namespace wrench {
/**
* @brief Read a file from the storage service
*
* @param answer_mailbox: the mailbox on which to expect the answer
* @param answer_mailbox: the answer mailbox to which the reply from the server should be sent
* @param location: the location
* @param num_bytes: the number of bytes to read
* @param wait_for_answer: whether to wait for the answer
Expand Down

0 comments on commit 9edff34

Please sign in to comment.