When running MPI program, we use command
mpiexec -hostfile ./conf/machines <my_mpi_program>
My hostfile ./conf/machines
192.168.1.54
192.168.1.55
192.168.1.56
192.168.1.57
And When executing MPI program, i got my processor rank by MPI_Comm_rank.
My question is how to get <rank, hostname> pair of each rank ?
The hostname should be the same with the hostfile i spcecified, and i just want to use ipaddress as the hostname in hostfile.
I tried to use MPI_Get_processor_name but it returned the name of my host teaker-4 , not the name in the specified hostfile.
And also, teaker-4 is 127.0.0.1, and I cannot modify /etc/hosts