Hi,I need to use rank of the mpi processes in my sub functions ( c language). which one has more cost?;
creating a new variable& and finding the rank in each sub function by: int mpi_rank; MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank);
or finding the rank in main function once, and every time sending this information to the functions in function arguments like
foo(a,b,c,mpi_rank);