Skip to content
Snippets Groups Projects
Commit 1faf44bf authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing bug with NBX_cnt

parent d8ee40b8
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,22 @@ bool ofp_initialized = false;
size_t tot_sent = 0;
size_t tot_recv = 0;
//! NBX has a potential pitfall that must be addressed,
//! NBX Send all the messages and probe for incoming messages,
//! if there is an incoming message it receive it producing
//! an acknowledge notification on the sending processor.
//! When all the sends has been acknowledged, the processor call the MPI_Ibarrier
//! when all the processors call MPI_Ibarrier all send has been received.
//! While the processors are waiting for the MPI_Ibarrier to complete, all processors
//! are still probing for incoming message, Unfortunately some processor
//! can quit the MPI_Ibarrier before others and this mean that some
//! processor can exit the probing status before others, these processors can in theory
//! start new communications while the other processor are still in probing status producing
//! a wrong send/recv association to
//! resolve this problem an incremental NBX_cnt is used as message TAG to distinguish that the
//! messages come from other send or subsequent NBX procedures
size_t NBX_cnt = 0;
std::string program_name;
#ifdef CUDA_GPU
......
......@@ -30,6 +30,8 @@ extern CudaMemory rem_tmp2[MAX_NUMER_OF_PROPERTIES];
#endif
extern size_t NBX_cnt;
void bt_sighandler(int sig, siginfo_t * info, void * ctx);
/*! \brief Implementation of VCluster class
......
......@@ -68,6 +68,8 @@ extern size_t tot_recv;
///////////////////// Post functions /////////////
extern size_t NBX_cnt;
template<typename T> void assign(T * ptr1, T * ptr2)
{
*ptr1 = *ptr2;
......@@ -124,22 +126,6 @@ class Vcluster_base
//! log file
Vcluster_log log;
//! NBX has a potential pitfall that must be addressed,
//! NBX Send all the messages and probe for incoming messages,
//! if there is an incoming message it receive it producing
//! an acknowledge notification on the sending processor.
//! When all the sends has been acknowledged, the processor call the MPI_Ibarrier
//! when all the processors call MPI_Ibarrier all send has been received.
//! While the processors are waiting for the MPI_Ibarrier to complete, all processors
//! are still probing for incoming message, Unfortunately some processor
//! can quit the MPI_Ibarrier before others and this mean that some
//! processor can exit the probing status before others, these processors can in theory
//! start new communications while the other processor are still in probing status producing
//! a wrong send/recv association to
//! resolve this problem an incremental NBX_cnt is used as message TAG to distinguish that the
//! messages come from other send or subsequent NBX procedures
size_t NBX_cnt;
//! temporal vector used for meta-communication
//! ( or meta-data before the real communication )
openfpm::vector<size_t> proc_com;
......@@ -226,7 +212,6 @@ class Vcluster_base
//! disable copy constructor
Vcluster_base(const Vcluster_base &)
:NBX_cnt(0)
{};
void queue_all_sends(size_t n_send , size_t sz[],
......@@ -306,7 +291,6 @@ public:
*
*/
Vcluster_base(int *argc, char ***argv)
:NBX_cnt(0)
{
// reset NBX_Active
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment