cuDDL
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
distributed.cuh File Reference
#include <mpi.h>
#include <algorithm>
#include <cstdint>
#include <filesystem>
#include <fstream>
#include <limits>
#include <memory>
#include <mutex>
#include <numeric>
#include <span>
#include <string>
#include <system_error>
#include <thread>
#include <vector>
#include <cuddl/reference_database_file.cuh>
#include <cuddl/replicated_database.cuh>

Go to the source code of this file.

Classes

struct  cuddl::genome_slice
 One rank's share of a genome collection split across an MPI communicator. More...
 
struct  cuddl::detail::reference_file_assembly
 Builds a reference_database_file from gathered parts; the file's members are private. More...
 
class  cuddl::shared_tile_counter
 A tile counter shared by every rank of a communicator, for replica_search::next_tile. More...
 

Namespaces

namespace  cuddl
 Batch operations over contiguous device rows.
 
namespace  cuddl::detail
 

Functions

Result< void > cuddl::detail::mpi_try (int status, char const *call)
 
Result< void > cuddl::detail::agree (Result< void > local, MPI_Comm comm)
 Returns local on the rank that failed, and on every other rank an error naming the lowest failing rank, so that all ranks leave a collective step together.
 
Result< std::vector< std::filesystem::path > > cuddl::detail::share_listing (std::filesystem::path const &input, int rank, MPI_Comm comm)
 Rank 0's listing of input on every rank.
 
size_t cuddl::detail::slice_begin (std::span< uint64_t const > bytes, uint64_t total, int rank, int size)
 First genome of rank rank's slice: contiguous slices of about equal bytes.
 
Result< genome_slice > cuddl::slice_genomes (std::filesystem::path const &input, MPI_Comm comm, unsigned workers=default_parser_workers())
 Lists a genome collection once and splits it into one contiguous slice per rank of comm, of about equal file bytes.
 
Result< std::vector< uint32_t > > cuddl::detail::slice_counts (reference_database_file const &mine, genome_slice const &slice, MPI_Comm comm)
 Every rank's genome count, after checking collectively that mine holds the sketches of this rank's slice and that every rank built with rank 0's settings.
 
Result< MPI_Datatype > cuddl::detail::row_type (uint32_t buckets)
 One row of buckets scores as a single MPI element, so counts of rows stay within int.
 
Result< reference_database_file > cuddl::gather_sketches (reference_database_file const &mine, genome_slice const &slice, MPI_Comm comm)
 Gathers every rank's sketches of its genome_slice into one file on every rank.
 
template<typename Search >
Result< void > cuddl::detail::shared_search (MPI_Comm comm, Search &&search)
 Runs search with a replica_search that shares tiles across the ranks of comm.
 
template<uint32_t K, size_t BucketCount, typename Layout , typename OnTile >
Result< void > cuddl::search_all_to_all (replicated_database< K, BucketCount, Layout > &group, OnTile &&on_tile, MPI_Comm comm)
 Compares every pair of group's references, sharing the tiles among the ranks of comm; collective.
 
template<uint32_t K, size_t BucketCount, typename Layout , typename OnTile >
Result< void > cuddl::search_all_to_all (replicated_database< K, BucketCount, Layout > &group, OnTile &&on_tile, search_options options, MPI_Comm comm)
 The threshold form of search_all_to_all: only pairs passing options reach on_tile.