starpu-runtime / starpu

This is a mirror of https://gitlab.inria.fr/starpu/starpu where our development happens, but contributions are welcome here too!
https://starpu.gitlabpages.inria.fr/
GNU Lesser General Public License v2.1
58 stars 13 forks source link

How to use starpu_mpi_isend to make communication normal? #25

Closed WwwwwYyyy closed 6 months ago

WwwwwYyyy commented 11 months ago

I would like to use starpu_mpi_isend replaces the previous communication MPI_Send, but after the modification, after the messages are sent, the whole program just stopped executing, even if we have also modified the recv function.. May I ask why?

void pangulu_send_vector_value(calculate_type *A, int_t N, int_t send_id, int signal) { MPI_Send(A, N, MPI_VAL_TYPE, send_id, signal, MPI_COMM_WORLD); }

void pangulu_send_vector_value(calculate_type *A, int_t N, int_t send_id, int signal) { // Register the array A as a StarPU data handle starpu_data_handle_t handle; starpu_vector_data_register(&handle, STARPU_MAIN_RAM, (uintptr_t)A, N, sizeof(calculate_type));

// Send the data using StarPU-MPI
starpu_mpi_req req;
starpu_mpi_tag_t signal_send = (int64_t)signal_send;

int ret = starpu_mpi_isend(handle, &req, send_id, signal_send, MPI_COMM_WORLD);
starpu_mpi_wait(&req, MPI_STATUS_IGNORE);   

if (ret != MPI_SUCCESS) {
    fprintf(stderr, "starpu_mpi_send failed with return code %d\n", ret);
    // Handle the error
}
MPI_Barrier(MPI_COMM_WORLD);

}

sthibaul commented 11 months ago

starpu_mpi_tag_t signal_send = (int64_t)signal_send;

This looks odd, shouldn't it be

starpu_mpi_tag_t signal_send = (int64_t)signal;

?