[mpich-discuss] best/fastest way to get a node communicator

Jeff Hammond jhammond at alcf.anl.gov
Tue Jan 17 13:24:59 CST 2012


I'm interested in being able to create a communicator for each node.
I have custom APIs for this on Blue Gene and Cray, but that doesn't
help on clusters.

I was thinking of doing the following:
- call gethostname on each rank
- gather these values to root
- sort the array and assign a different color number for each unique
value in a new array
- scatter the color array and call comm_split

Does anyone know of a better/faster way to do this?  I assume that the
sort is rarely necessary, i.e. the ranks are ordered by node already,
but I don't want to assume this.

Are there settings where gethostname is not specific enough to
distinguish nodes?

Thanks,

Jeff

-- 
Jeff Hammond
Argonne Leadership Computing Facility
University of Chicago Computation Institute
jhammond at alcf.anl.gov / (630) 252-5381
http://www.linkedin.com/in/jeffhammond
https://wiki.alcf.anl.gov/old/index.php/User:Jhammond


More information about the mpich-discuss mailing list