|
| | MallobSharing (const std::shared_ptr< ClauseDatabase > &clauseDB, unsigned long baseBufferSize, unsigned long maxBufferSize, unsigned int lbdLimitAtImport, unsigned int sizeLimitAtImport, unsigned int roundsPerSecond, float maxCompensation, unsigned int resharePeriodMicroSec) |
| | Constructor for MallobSharing.
|
| |
|
| ~MallobSharing () |
| | Destructor for MallobSharing.
|
| |
| bool | initMpiVariables () override |
| | Initializes MPI-related variables.
|
| |
| bool | doSharing () override |
| | Performs the clause sharing operation.
|
| |
| void | joinProcess (int winnerRank, SatResult res, const std::vector< int > &model) override |
| | Handles the process of joining when a solution is found.
|
| |
| bool | importClause (const ClauseExchangePtr &cls) override |
| | Imports a clause into the clause database.
|
| |
| std::chrono::microseconds | getSleepingTime () override |
| | Gets the sleeping time for the sharing strategy.
|
| |
| void | initializeFilter (unsigned int resharingPeriod, unsigned int sharingsPerSecond, unsigned int maxProducerId=63) |
| | Initializes the sharing filter with given parameters.
|
| |
| bool | doesClauseExist (const ClauseExchangePtr &cls) const |
| | Checks if a clause exists in the sharing map.
|
| |
| void | updateClause (const ClauseExchangePtr &cls) |
| | Updates the metadata for an existing clause.
|
| |
| bool | insertClause (const ClauseExchangePtr &cls) |
| | Inserts a new clause or updates an existing one in the sharing map.
|
| |
| bool | isClauseShared (const ClauseExchangePtr &cls) const |
| | Checks if a clause has been shared recently.
|
| |
| bool | canConsumerImportClause (const ClauseExchangePtr &cls, unsigned consumerId) |
| | Determines if a consumer can import a given clause.
|
| |
|
void | incrementEpoch () |
| | Increments the current epoch.
|
| |
| void | markClauseAsShared (ClauseExchangePtr &cls) |
| | Marks a clause as shared, updating its metadata.
|
| |
| size_t | shrinkFilter () |
| | Shrinks the filter to remove entries of clauses that can be reshared. Once a clause was shared m_resharingPeriod rpochs back it can be reshared.
|
| |
| | GlobalSharingStrategy (const std::shared_ptr< ClauseDatabase > &clauseDB, const std::vector< std::shared_ptr< SharingEntity > > &producers={}, const std::vector< std::shared_ptr< SharingEntity > > &consumers={}) |
| | Constructor for GlobalSharingStrategy.
|
| |
|
virtual | ~GlobalSharingStrategy () |
| | Destructor.
|
| |
| void | importClauses (const std::vector< ClauseExchangePtr > &v_cls) override |
| | Imports multiple clauses into the clause database.
|
| |
| void | printStats () override |
| | Prints the statistics of the sharing strategy.
|
| |
| | SharingStrategy (const std::vector< std::shared_ptr< SharingEntity > > &producers, const std::vector< std::shared_ptr< SharingEntity > > &consumers, const std::shared_ptr< ClauseDatabase > &clauseDB) |
| | Constructor for SharingStrategy. Be sure to call connectConstructorProducers after construction, this is due to the base class shared_from_this.
|
| |
|
virtual | ~SharingStrategy () |
| | Virtual destructor.
|
| |
| void | connectConstructorProducers () |
| | Add this to the producers' clients list.
|
| |
| virtual void | addProducer (std::shared_ptr< SharingEntity > producer) |
| | Adds a producer to this strategy.
|
| |
| virtual void | connectProducer (std::shared_ptr< SharingEntity > producer) |
| | Connect a producer to this strategy. Add (this) to clients of (producer)
|
| |
| virtual void | removeProducer (std::shared_ptr< SharingEntity > producer) |
| | Removes a producer from this strategy.
|
| |
| | SharingEntity () |
| | Construct a new SharingEntity object.
|
| |
| | SharingEntity (const std::vector< std::shared_ptr< SharingEntity > > &clients) |
| | Construct a new SharingEntity object.
|
| |
|
virtual | ~SharingEntity () |
| | Destroy the SharingEntity object.
|
| |
| int | getSharingId () const |
| | Get the sharing ID of this entity.
|
| |
| void | setSharingId (int _id) |
| | Set the sharing ID of this entity.
|
| |
| virtual void | addClient (std::shared_ptr< SharingEntity > client) |
| | Add a client to this entity.
|
| |
| virtual void | removeClient (std::shared_ptr< SharingEntity > client) |
| | Remove a specific client from this entity.
|
| |
| size_t | getClientCount () const |
| | Get the current number of clients.
|
| |
|
void | clearClients () |
| | Remove all clients.
|
| |
|
| bool | exportClauseToClient (const ClauseExchangePtr &clause, std::shared_ptr< SharingEntity > client) override |
| | Exports a clause to a specific client.
|
| |
| void | deserializeClauses (const std::vector< int > &serialized_v_cls) |
| | Deserializes received clauses.
|
| |
| int | mergeSerializedBuffersWithMine (std::vector< std::reference_wrapper< std::vector< int > > > &buffers, std::vector< int > &result, size_t &nonFreeLiteralsCount) |
| | Merges serialized buffers with local clauses from the m_clauseDB database.
|
| |
| void | computeBufferSize (unsigned int aggregationsCount) |
| | Computes the buffer size based on the number of aggregations.
|
| |
| bool | getOneClauseWrapper (ClauseExchangePtr &cls) |
| | Wrapper for getting one clause from the database. This remove the need to make the filter thread-safe.
|
| |
|
void | computeCompensation () |
| | Computes the compensation factor for volume balancing.
|
| |
| bool | exportClauseToClient (const ClauseExchangePtr &clause, std::shared_ptr< SharingEntity > client) override |
| | A SharingStrategy doesn't send a clause to the source client (->from must store the sharingId of its producer)
|
| |
| bool | exportClause (const ClauseExchangePtr &clause) |
| | Export a clause to all registered clients.
|
| |
| void | exportClauses (const std::vector< ClauseExchangePtr > &clauses) |
| | Export multiple clauses to all registered clients.
|
| |
|
|
unsigned int | defaultBufferSize |
| | Default size of the sharing buffer.
|
| |
|
const unsigned int | baseSize |
| | Base size for buffer calculations.
|
| |
|
const unsigned int | maxSize |
| | Maximum size for buffer calculations.
|
| |
|
std::vector< std::reference_wrapper< std::vector< int > > > | buffers |
| | Buffers for clause sharing.
|
| |
|
std::vector< int > | clausesToSendSerialized |
| | Buffer for serialized clauses to send.
|
| |
|
std::vector< int > | receivedClausesLeft |
| | Buffer for clauses received from left child.
|
| |
|
std::vector< int > | receivedClausesRight |
| | Buffer for clauses received from right child.
|
| |
|
std::vector< int > | receivedClausesFather |
| | Buffer for clauses received from parent.
|
| |
|
std::vector< ClauseExchangePtr > | deserializedClauses |
| | Buffer for deserialized clauses.
|
| |
|
Bitset | myBitVector |
| | Bitset for tracking shared clauses.
|
| |
|
int | father |
| | MPI rank of the parent node.
|
| |
|
int | left_child |
| | MPI rank of the left child.
|
| |
|
int | right_child |
| | MPI rank of the right child.
|
| |
|
int | nb_children |
| | Number of children nodes.
|
| |
|
size_t | sleepTime |
| | Sleep time between sharing operations.
|
| |
|
bool | addChildClauses |
| | Flag to determine if child clauses should be added.
|
| |
|
const int | lbdLimitAtImport |
| | LBD limit for clause import.
|
| |
|
const int | sizeLimitAtImport |
| | Size limit for clause import.
|
| |
|
unsigned | m_freeSize |
| | Clause size not counted in the buffer at serialization.
|
| |
|
float | accumulatedAdmittedLiterals |
| | Accumulated number of literals shared to parent.
|
| |
|
float | accumulatedDesiredLiterals |
| | Accumulated number of literals received from children.
|
| |
|
size_t | lastEpochAdmittedLits |
| | Number of literals in last epoch final buffer.
|
| |
|
size_t | lastEpochReceivedLits |
| | Number of literals received in last epoch.
|
| |
|
float | compensationFactor |
| | Factor for volume compensation.
|
| |
|
float | maxCompensationFactor |
| | Maximum Compensation factor.
|
| |
|
float | estimatedIncomingLits |
| | Estimated number of incoming literals.
|
| |
|
float | estimatedSharedLits |
| | Estimated number of shared literals.
|
| |
|
GlobalSharingStatistics | gstats |
| | Statistics for global sharing.
|
| |
|
bool | requests_sent |
| | Flag indicating if requests to end were sent to the root.
|
| |
|
std::vector< MPI_Request > | recv_end_requests |
| | MPI requests for non-blocking receive of end signals.
|
| |
|
MPI_Request | send_end_request |
| | MPI request for non-root Isend for final synchronization with root.
|
| |
|
std::vector< int > | receivedFinalResultRoot |
| | Buffer for storing results received from other mpi processes.
|
| |
|
std::shared_ptr< ClauseDatabase > | m_clauseDB |
| | Clause database where exported clauses are stored.
|
| |
|
SharingStatistics | stats |
| | Sharing statistics.
|
| |
|
std::vector< std::weak_ptr< SharingEntity > > | m_producers |
| | The set holding the references to the producers.
|
| |
|
std::shared_mutex | m_producersMutex |
| | Shared mutex for producers list (to become RCU ?)
|
| |
|
std::vector< std::weak_ptr< SharingEntity > > | m_clients |
| | List of weak pointers to client SharingEntities.
|
| |
|
std::shared_mutex | m_clientsMutex |
| | Mutex to protect access to m_clients.
|
| |
Implements a global sharing strategy based on the Mallob algorithm.
This class extends GlobalSharingStrategy to implement a specific sharing mechanism inspired by the Mallob algorithm for distributed SAT solving (ref:https://doi.org/10.1613/jair.1.15827).