Changeset 5641

Show
Ignore:
Timestamp:
10/30/09 19:01:13 (3 weeks ago)
Author:
balaji
Message:

Fix for the MPICH_INTERFACE_HOSTNAME issue (ticket #903). Now Hydra
will automatically pick the hostname specified by the user in the
hostfile as the preferred communication interface. With this, Hydra
should work more correctly as described in
http://wiki.mcs.anl.gov/mpich2/index.php/Using_the_Hydra_Process_Manager#Hydra_with_Non-Ethernet_Networks

Location:
mpich2/trunk/src/pm/hydra/pm/pmiserv
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • mpich2/trunk/src/pm/hydra/pm/pmiserv/pmi_proxy.h

    r5474 r5641  
    4747    struct { 
    4848        int id; 
     49        char *hostname; 
     50 
    4951        int proxy_core_count; 
    5052        int proxy_process_count; 
  • mpich2/trunk/src/pm/hydra/pm/pmiserv/pmi_proxy_utils.c

    r5630 r5641  
    3636 
    3737    HYD_pmcd_pmip.local.id = -1; 
     38    HYD_pmcd_pmip.local.hostname = NULL; 
    3839    HYD_pmcd_pmip.local.proxy_core_count = 0; 
    3940    HYD_pmcd_pmip.local.proxy_process_count = 0; 
     
    173174        } 
    174175 
     176        /* Hostname (as specified by the user) */ 
     177        if (!strcmp(*argv, "--hostname")) { 
     178            argv++; 
     179            HYD_pmcd_pmip.local.hostname = HYDU_strdup(*argv); 
     180            continue; 
     181        } 
     182 
    175183        /* Process count */ 
    176184        if (!strcmp(*argv, "--proxy-core-count")) { 
     
    414422        HYDU_FREE(HYD_pmcd_pmip.downstream.exit_status); 
    415423 
     424    if (HYD_pmcd_pmip.local.hostname) 
     425        HYDU_FREE(HYD_pmcd_pmip.local.hostname); 
     426 
    416427    HYDT_bind_finalize(); 
    417428 
     
    607618        } 
    608619 
     620        /* Set the MPICH_INTERFACE_HOSTNAME based on what the user provided */ 
     621        if (HYD_pmcd_pmip.local.hostname) { 
     622            status = HYDU_env_create(&env, "MPICH_INTERFACE_HOSTNAME", 
     623                                     HYD_pmcd_pmip.local.hostname); 
     624            HYDU_ERR_POP(status, "unable to create env\n"); 
     625 
     626            status = HYDU_append_env_to_list(*env, &prop_env); 
     627            HYDU_ERR_POP(status, "unable to add env to list\n"); 
     628        } 
     629 
    609630        for (i = 0; i < exec->proc_count; i++) { 
    610631            pmi_id = HYDU_local_to_global_id(process_id, 
  • mpich2/trunk/src/pm/hydra/pm/pmiserv/pmi_serv_launch.c

    r5588 r5641  
    230230 
    231231        arg = 0; 
     232        proxy->exec_launch_info[arg++] = HYDU_strdup("--hostname"); 
     233        proxy->exec_launch_info[arg++] = HYDU_strdup(proxy->hostname); 
     234 
    232235        proxy->exec_launch_info[arg++] = HYDU_strdup("--global-core-count"); 
    233236        proxy->exec_launch_info[arg++] = HYDU_int_to_str(HYD_handle.global_core_count);