从超级计算机上的MPI程序获取IP地址

时间:2018-04-15 23:43:10

标签: fortran ip mpi

我有以下MPI计划:

 program hello
    include 'mpif.h'

    integer my_pe_num,errcode
    call MPI_INIT(errcode)
    call MPI_COMM_RANK(MPI_COMM_WORLD,my_pe_num,errcode)
    print *, 'Hello from ', my_pe_num, '.'
    call MPI_FINALIZE(errcode)

 end program hello

没关系。现在我想从每个进程获得IP地址以符合排名。我看了MPI_Get_Processor_name,但那不是我想要的。

当我运行它时,它是通过超级计算机上的批处理。运行该程序的实际步骤是:

mpirun -np 4 ./hello

0 个答案:

没有答案