3#include "ErrorCodes.hpp"
4#include "containers/ClauseUtils.hpp"
16#define TESTRUNMPI(func) \
18 int result = (func); \
19 if (dist && result != MPI_SUCCESS) { \
20 LOGERROR("MPI ERROR: %d in function %s", result, #func); \
29extern int mpi_world_size;
44sendFormula(std::vector<simpleClause>& clauses,
unsigned int* varCount,
int rootRank);
52serializeClauses(
const std::vector<simpleClause>& clauses, std::vector<int>& serializedClauses);
59deserializeClauses(
const std::vector<int>& serializedClauses, std::vector<simpleClause>& clauses);
A set of helper functions for distributed solver initialization and finalization using MPI.
Definition MpiUtils.hpp:36
bool sendFormula(std::vector< simpleClause > &clauses, unsigned int *varCount, int rootRank)
Sends a formula represented by clauses and variable count over MPI.
bool deserializeClauses(const std::vector< int > &serializedClauses, std::vector< simpleClause > &clauses)
Deserializes a vector of characters into a vector of simpleClause objects.
bool serializeClauses(const std::vector< simpleClause > &clauses, std::vector< int > &serializedClauses)
Serializes a vector of Clauses into a vector of integers.
void sendModelToRoot()
The winner determined by the root will send the model if the answer was SATISFIABLE.