This eparates sent and received messages when trying to match a new one to avoid matching a send with another send.
{
//get the dynar for src#dst
char aux[INSTR_DEFAULT_STR_SIZE];
{
//get the dynar for src#dst
char aux[INSTR_DEFAULT_STR_SIZE];
- snprintf(aux, INSTR_DEFAULT_STR_SIZE, "%d#%d", src, dst);
+ snprintf(aux, INSTR_DEFAULT_STR_SIZE, "r%d#%d", src, dst);
xbt_dynar_t d = static_cast<xbt_dynar_t>(xbt_dict_get_or_null(keys, aux));
if(xbt_dynar_is_empty(d) == 0){
xbt_dynar_t d = static_cast<xbt_dynar_t>(xbt_dict_get_or_null(keys, aux));
if(xbt_dynar_is_empty(d) == 0){
if (d == nullptr) {
d = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
if (d == nullptr) {
d = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
+ snprintf(aux, INSTR_DEFAULT_STR_SIZE, "s%d#%d", src, dst);
xbt_dict_set(keys, aux, d, nullptr);
}
xbt_dict_set(keys, aux, d, nullptr);
}
static char *TRACE_smpi_get_key(int src, int dst, char *key, int n)
{
char aux[INSTR_DEFAULT_STR_SIZE];
static char *TRACE_smpi_get_key(int src, int dst, char *key, int n)
{
char aux[INSTR_DEFAULT_STR_SIZE];
- snprintf(aux, INSTR_DEFAULT_STR_SIZE, "%d#%d", src, dst);
+ snprintf(aux, INSTR_DEFAULT_STR_SIZE, "s%d#%d", src, dst);
xbt_dynar_t d = static_cast<xbt_dynar_t>(xbt_dict_get_or_null(keys, aux));
// sometimes the receive may be posted before the send
xbt_dynar_t d = static_cast<xbt_dynar_t>(xbt_dict_get_or_null(keys, aux));
// sometimes the receive may be posted before the send