[mpich-discuss] Number processes/CPU in Hydra -hostlist
Pavan Balaji
balaji at mcs.anl.gov
Mon Aug 2 10:25:26 CDT 2010
This fix is committed in r6973
[http://trac.mcs.anl.gov/projects/mpich2/changeset/6973]. The latest
nightly snapshot
[http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/nightly/trunk]
should have it.
-- Pavan
On 08/01/2010 03:17 PM, Pavan Balaji wrote:
>
> Thanks for the suggestion. We had gotten this request earlier too, but
> it never reached a high-enough priority. I've fixed this on my local git
> repository and will commit it in to the svn tomorrow (the svn server is
> down at the moment).
>
> -- Pavan
>
> On 07/26/2010 01:56 PM, Yauheni Zelenko wrote:
>> Hi!
>>
>> I want to suggest next patch which will allow to specify number of processes/CPU in -hostlist command line option in Hydra.
>>
>> Goal is to provide similar functionality as Platform LSF's LSB_MCPU_HOSTS.
>>
>> Host name and number of CPUs may be separated with colon or space.
>>
>> Changes are in /home/zelenko/Installs/GCC4.4.0/mpich2-1.3a2.src/src/pm/hydra/ui/mpich/utils., hostlist_fn()
>>
>> from:
>>
>> while (hostname) {
>> status = HYDU_add_to_node_list(hostname, 1,&HYD_handle.node_list);
>> HYDU_ERR_POP(status, "unable to add to node list\n");
>>
>> hostname = strtok(NULL, ",");
>> }
>>
>> to:
>>
>> while (hostname) {
>> char* num_procs_str = NULL;
>> int num_procs = 1;
>>
>> num_procs_str = strchr(hostname, ':');
>> if (!num_procs_str)
>> num_procs_str = strchr(hostname, ' ');
>> if (num_procs_str)
>> {
>> *num_procs_str = '\0';
>> num_procs_str++;
>> num_procs = atoi(num_procs_str);
>> }
>> status = HYDU_add_to_node_list(hostname, num_procs,&HYD_handle.node_list);
>> HYDU_ERR_POP(status, "unable to add to node list\n");
>>
>> hostname = strtok(NULL, ",");
>> }
>>
>> Eugene.
>> _______________________________________________
>> mpich-discuss mailing list
>> mpich-discuss at mcs.anl.gov
>> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
--
Pavan Balaji
http://www.mcs.anl.gov/~balaji
More information about the mpich-discuss
mailing list