[mpich-discuss] #1136: Sorting node list in Hydra

Yauheni Zelenko zelenko at cadence.com
Wed Dec 8 13:00:21 CST 2010


Hi, Pavan!

I created temporary array for pointers to list items and sort it. Then list items were arranged based on their order in e-mail.

It worked for me. One drawback of implementation is need for temporary array.

Eugene.
________________________________________
From: Pavan Balaji [balaji at mcs.anl.gov]
Sent: Tuesday, December 07, 2010 10:13 PM
To: mpich-discuss at mcs.anl.gov
Cc: Yauheni Zelenko
Subject: Re: [mpich-discuss] #1136: Sorting node list in Hydra

On 12/07/2010 06:53 PM, Yauheni Zelenko wrote:
> I tried hydra-r7555 build and node list is always sorted in
> ascending order independently of command line option value.
> HYD_handle.sort_order should be accounted in both sort_node_list()
> and append_node_to_list().

Oops! Fixed it in r7564 in trunk and r7565 in the 1.3.x branch.

> Somehow I feel that qsort()-based implementation will be easier to
> understand. See my previous email on this topic.

Can you provide a patch for this? Note that the node list is a linked
list, not an array, so I believe the code snippet that you sent in your
previous email will not work correctly.

  -- Pavan

--
Pavan Balaji
http://www.mcs.anl.gov/~balaji


More information about the mpich-discuss mailing list