/*
int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm) {
int retval = MPI_SUCCESS;
/*
int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm) {
int retval = MPI_SUCCESS;
int rank = smpi_comm_rank(comm, host);
smpi_mpi_comm_split_table_node_t *split_table;
split_table = xbt_malloc(sizeof(smpi_mpi_comm_split_table_node_t) * comm->size);
int rank = smpi_comm_rank(comm, host);
smpi_mpi_comm_split_table_node_t *split_table;
split_table = xbt_malloc(sizeof(smpi_mpi_comm_split_table_node_t) * comm->size);
retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, &recvreq);
if (NULL != recvreq) {
smpi_irecv(recvreq);
retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, &recvreq);
if (NULL != recvreq) {
smpi_irecv(recvreq);
retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, &recvreq);
if (NULL != recvreq) {
smpi_irecv(recvreq);
retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, &recvreq);
if (NULL != recvreq) {
smpi_irecv(recvreq);
retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, &sendreq);
if (NULL != sendreq) {
smpi_isend(sendreq);
retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, &sendreq);
if (NULL != sendreq) {
smpi_isend(sendreq);
retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, &sendreq);
if (NULL != sendreq) {
smpi_isend(sendreq);
retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, &sendreq);
if (NULL != sendreq) {
smpi_isend(sendreq);
if (root == rank) {
smpi_create_request(buf, count, datatype, root, (rank + 1) % comm->size, 0, comm, &request);
if (root == rank) {
smpi_create_request(buf, count, datatype, root, (rank + 1) % comm->size, 0, comm, &request);
sendreqs = xbt_malloc(sizeof(smpi_mpi_request_t*) * comm->size);
recvreqs = xbt_malloc(sizeof(smpi_mpi_request_t*) * comm->size);
sendreqs = xbt_malloc(sizeof(smpi_mpi_request_t*) * comm->size);
recvreqs = xbt_malloc(sizeof(smpi_mpi_request_t*) * comm->size);