Exemple #1
0
int main()
{
    DCMF_Messager_initialize();

    init();

    barrier_init(DCMF_DEFAULT_GLOBALBARRIER_PROTOCOL);

    control_init(DCMF_DEFAULT_CONTROL_PROTOCOL, DCMF_DEFAULT_NETWORK);

    memregion_init(MAX_BUF_SIZE * nranks);

    put_init(DCMF_DEFAULT_PUT_PROTOCOL, DCMF_TORUS_NETWORK);

    barrier();

    if (myrank == 0)
    {
        printf("Put Latency (usec) post vs restart\n");
        fflush(stdout);
    }
    put_restart();

    barrier();

    printf("[%d] Benchmark complete\n", myrank);
    fflush(stdout);

    memregion_finalize();

    DCMF_Messager_finalize();

    return 0;
}
Exemple #2
0
s4u::CommPtr Mailbox::put_async(void* payload, uint64_t simulated_size_in_bytes)
{
  xbt_assert(payload != nullptr, "You cannot send nullptr");

  s4u::CommPtr res = put_init(payload, simulated_size_in_bytes);
  res->start();
  return res;
}
Exemple #3
0
s4u::CommPtr Mailbox::put_init(void* data, uint64_t simulated_size_in_bytes)
{
  s4u::CommPtr res = put_init();
  res->set_remaining(simulated_size_in_bytes);
  res->src_buff_      = data;
  res->src_buff_size_ = sizeof(void*);
  return res;
}
Exemple #4
0
void Mailbox::put(void* payload, uint64_t simulated_size_in_bytes)
{
  xbt_assert(payload != nullptr, "You cannot send nullptr");

  CommPtr c = put_init();
  c->set_remaining(simulated_size_in_bytes);
  c->set_src_data(payload);
  c->wait();
}
Exemple #5
0
/** Blocking send with timeout */
void Mailbox::put(void* payload, uint64_t simulated_size_in_bytes, double timeout)
{
  xbt_assert(payload != nullptr, "You cannot send nullptr");

  CommPtr c = put_init();
  c->set_remaining(simulated_size_in_bytes);
  c->set_src_data(payload);
  // c->start() is optional.
  c->wait(timeout);
}
Exemple #6
0
int main()
{
    DCMF_Messager_initialize();

    init();

    barrier_init(DCMF_DEFAULT_GLOBALBARRIER_PROTOCOL);

    allreduce_init(DCMF_DEFAULT_GLOBALALLREDUCE_PROTOCOL);

    control_init(DCMF_DEFAULT_CONTROL_PROTOCOL, DCMF_DEFAULT_NETWORK);

    memregion_init(MAX_MSG_SIZE_LOCAL * ITERATIONS_LOCAL * 2);

    put_init(DCMF_DEFAULT_PUT_PROTOCOL, DCMF_TORUS_NETWORK);

    barrier();

    printf("[%d] Start \n", myrank);
    fflush(stdout);

    if (myrank == 0)
    {
        printf("Intra node transfer latency - memcpy vs put \n");
        fflush(stdout);
    }
    memcpyvsput();

    barrier();

    if (myrank == 0)
    {
        printf("[%d] Benchmark Complete \n", myrank);
        fflush(stdout);
    }

    memregion_finalize();

    DCMF_Messager_finalize();

    return 0;
}