[mpich-discuss] translate rank to hostname
YANG Fan
iddmbr at gmail.com
Fri Mar 13 03:30:30 CDT 2015
Hi Andreas,
Thanks a lot for your example! Btw your blog is beneficial for me as well
:-)
Best Regards,
Fan
On Fri, Mar 13, 2015 at 3:02 PM, Andreas Schäfer <gentryx at gmx.de> wrote:
> Hi,
>
> If the names of your hosts differ in length, then you'll need to use
> MPI_Get_processor_name + MPI_Allgather + MPI_Allgatherv, for a quick
> example please see the attached code.
>
> Cheers
> -Andreas
>
>
> On 22:46 Thu 12 Mar , Jeff Hammond wrote:
> > Try MPI_Allgather on the output of MPI_Get_processor_name.
> >
> > Jeff
> >
> > On Thu, Mar 12, 2015 at 10:41 PM, YANG Fan <iddmbr at gmail.com> wrote:
> > > Thanks, Jeff!
> > >
> > > But there's one problem. Suppose I'm on rank 1 and I want to know the
> host
> > > name of rank 2, then using this function I can only know my own host
> name. I
> > > hope that I can know others' host names...
> > >
> > > On Fri, Mar 13, 2015 at 11:15 AM, Jeff Hammond <jeff.science at gmail.com
> >
> > > wrote:
> > >>
> > >> Try MPI_Get_processor_name.
> > >>
> > >> Jeff
> > >>
> > >>
> > >> On Thursday, March 12, 2015, YANG Fan <iddmbr at gmail.com> wrote:
> > >>>
> > >>> Hi,
> > >>>
> > >>> To run an MPI program on a cluster I need to pass the host file as a
> > >>> parameter. However, how can I know that what host name does a
> specific rank
> > >>> correspond to? Or how can I access the host file inside my MPI
> program?
> > >>> Thanks!
> > >>>
> > >>> Best Regards,
> > >>> Fan
> > >>
> > >>
> > >>
> > >> --
> > >> Jeff Hammond
> > >> jeff.science at gmail.com
> > >> http://jeffhammond.github.io/
> > >>
> > >> _______________________________________________
> > >> discuss mailing list discuss at mpich.org
> > >> To manage subscription options or unsubscribe:
> > >> https://lists.mpich.org/mailman/listinfo/discuss
> > >
> > >
> > >
> > > _______________________________________________
> > > discuss mailing list discuss at mpich.org
> > > To manage subscription options or unsubscribe:
> > > https://lists.mpich.org/mailman/listinfo/discuss
> >
> >
> >
> > --
> > Jeff Hammond
> > jeff.science at gmail.com
> > http://jeffhammond.github.io/
> > _______________________________________________
> > discuss mailing list discuss at mpich.org
> > To manage subscription options or unsubscribe:
> > https://lists.mpich.org/mailman/listinfo/discuss
>
> --
> ==========================================================
> Andreas Schäfer
> HPC and Grid Computing
> Chair of Computer Science 3
> Friedrich-Alexander-Universität Erlangen-Nürnberg, Germany
> +49 9131 85-27910
> PGP/GPG key via keyserver
> http://www.libgeodecomp.org
> ==========================================================
>
> (\___/)
> (+'.'+)
> (")_(")
> This is Bunny. Copy and paste Bunny into your
> signature to help him gain world domination!
>
> _______________________________________________
> discuss mailing list discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20150313/b14cad12/attachment.html>
-------------- next part --------------
_______________________________________________
discuss mailing list discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss
More information about the discuss
mailing list