37 #define XMIPP_MPI_SIZE_T MPI_UNSIGNED_LONG 53 MpiNode(
int &argc,
char **& argv);
82 #define TAG_WORK_REQUEST 100 83 #define TAG_WORK_RESPONSE 101 93 std::shared_ptr<MpiNode>
node;
95 virtual bool distribute(
size_t &
first,
size_t &last);
109 bool distributeMaster();
111 bool distributeSlaves(
size_t &
first,
size_t &last);
144 char lockFilename[L_tmpnam];
173 void setNode(
const std::shared_ptr<MpiNode> & node);
177 void read(
int argc,
char **argv);
181 virtual int tryRun();
205 void read(
int argc,
char **argv);
210 void createTaskDistributor(
MetaData &mdIn,
size_t blockSize = 0);
216 bool getTaskToProcess(
size_t &objId,
size_t &objIndex);
221 template <
typename BASE_CLASS>
225 BASE_CLASS::defineParams();
231 BASE_CLASS::readParams();
235 BASE_CLASS::preProcess();
236 MetaData &mdIn = *this->getInputMd();
239 createTaskDistributor(mdIn, blockSize);
245 BASE_CLASS::startProcessing();
252 BASE_CLASS::time_bar_done =
first + 1;
253 BASE_CLASS::showProgress();
258 return getTaskToProcess(objId, objIndex);
266 this->getOutputMd() = MDaux;
268 BASE_CLASS::finishProcessing();
281 MPI_Datatype datatype,
284 MPI_Comm communicator,
285 size_t blockSize=1048576);
void xmipp_MPI_Reduce(void *send_data, void *recv_data, size_t count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm communicator, size_t blockSize=1048576)
ParallelTaskDistributor * distributor
std::shared_ptr< MpiNode > node
MpiNode(int &argc, char **&argv)
MpiNode & operator=(const MpiNode &)=delete
std::shared_ptr< MpiNode > node
std::shared_ptr< MpiNode > node
file read(std::istream &is)
void gatherMetadatas(T &MD, const FileName &rootName)