#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>

#define buff_size 128


int main(int argc, char **argv) {
  int nprocs = -1;
  int rank = -1;

  MPI_Comm newcom = MPI_COMM_NULL;

  MPI_Init(&argc, &argv);
  MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
  MPI_Comm_rank(MPI_COMM_WORLD, &rank);

  MPI_Comm_dup(MPI_COMM_WORLD, &newcom);

  if (newcom != MPI_COMM_NULL && newcom != MPI_COMM_WORLD)
    MPI_Comm_free(&newcom);

  MPI_Finalize();
  return 0;
}
