[mpich2-commits] r4002 - in mpich2/trunk/src/pm/hydra: include launcher/mpiexec launcher/utils utils/timer
balaji at mcs.anl.gov
balaji at mcs.anl.gov
Tue Mar 10 17:48:33 CDT 2009
Author: balaji
Date: 2009-03-10 17:48:33 -0500 (Tue, 10 Mar 2009)
New Revision: 4002
Modified:
mpich2/trunk/src/pm/hydra/include/hydra_utils.h
mpich2/trunk/src/pm/hydra/launcher/mpiexec/mpiexec.c
mpich2/trunk/src/pm/hydra/launcher/utils/lchu.c
mpich2/trunk/src/pm/hydra/utils/timer/timer.c
Log:
Added back the code to wrap
Modified: mpich2/trunk/src/pm/hydra/include/hydra_utils.h
===================================================================
--- mpich2/trunk/src/pm/hydra/include/hydra_utils.h 2009-03-10 22:20:00 UTC (rev 4001)
+++ mpich2/trunk/src/pm/hydra/include/hydra_utils.h 2009-03-10 22:48:33 UTC (rev 4002)
@@ -26,7 +26,7 @@
struct HYD_Partition_list {
char *name;
int proc_count;
- char **mapping; /* Can be core IDs or something else */
+ char **mapping; /* Can be core IDs or something else */
/*
* The boot-strap server is expected to start a single executable
@@ -48,8 +48,8 @@
* 3. One proxy per physical node means that each partition will
* have a different group ID.
*/
- int group_id; /* Assumed to be in ascending order */
- int group_rank; /* Rank within the group */
+ int group_id; /* Assumed to be in ascending order */
+ int group_rank; /* Rank within the group */
int pid;
int out;
int err;
@@ -164,7 +164,7 @@
#include <time.h>
#endif /* HAVE_TIME */
typedef struct timeval HYD_Time;
-void HYDU_Time_set(HYD_Time * time, int * val);
+void HYDU_Time_set(HYD_Time * time, int *val);
int HYDU_Time_left(HYD_Time start, HYD_Time timeout);
Modified: mpich2/trunk/src/pm/hydra/launcher/mpiexec/mpiexec.c
===================================================================
--- mpich2/trunk/src/pm/hydra/launcher/mpiexec/mpiexec.c 2009-03-10 22:20:00 UTC (rev 4001)
+++ mpich2/trunk/src/pm/hydra/launcher/mpiexec/mpiexec.c 2009-03-10 22:48:33 UTC (rev 4002)
@@ -91,7 +91,7 @@
if (getenv("MPIEXEC_TIMEOUT"))
timeout = atoi(getenv("MPIEXEC_TIMEOUT"));
else
- timeout = -1; /* Set a negative timeout */
+ timeout = -1; /* Set a negative timeout */
HYDU_Time_set(&handle.timeout, &timeout);
/* Launch the processes */
Modified: mpich2/trunk/src/pm/hydra/launcher/utils/lchu.c
===================================================================
--- mpich2/trunk/src/pm/hydra/launcher/utils/lchu.c 2009-03-10 22:20:00 UTC (rev 4001)
+++ mpich2/trunk/src/pm/hydra/launcher/utils/lchu.c 2009-03-10 22:48:33 UTC (rev 4002)
@@ -15,7 +15,7 @@
FILE *fp = NULL;
char line[2 * MAX_HOSTNAME_LEN], *hostname, *procs;
struct HYD_Proc_params *proc_params;
- struct HYD_Partition_list *partition;
+ struct HYD_Partition_list *partition, *run;
int num_procs, total_procs;
HYD_Status status = HYD_SUCCESS;
@@ -75,8 +75,28 @@
}
}
- if (total_procs != proc_params->exec_proc_count)
- break;
+ /* We don't have enough processes; use whatever we have */
+ if (total_procs != proc_params->exec_proc_count) {
+ for (partition = proc_params->partition;
+ partition->next; partition = partition->next);
+ run = proc_params->partition;
+
+ /* Optimize the case where there is only one node */
+ if (run->next == NULL) {
+ run->proc_count = proc_params->exec_proc_count;
+ }
+ else {
+ while (total_procs != proc_params->exec_proc_count) {
+ HYDU_Allocate_Partition(&partition->next);
+ partition = partition->next;
+ partition->name = MPIU_Strdup(run->name);
+ partition->proc_count = run->proc_count;
+ total_procs += partition->proc_count;
+ run = run->next;
+ }
+ }
+ }
+
proc_params = proc_params->next;
}
Modified: mpich2/trunk/src/pm/hydra/utils/timer/timer.c
===================================================================
--- mpich2/trunk/src/pm/hydra/utils/timer/timer.c 2009-03-10 22:20:00 UTC (rev 4001)
+++ mpich2/trunk/src/pm/hydra/utils/timer/timer.c 2009-03-10 22:48:33 UTC (rev 4002)
@@ -8,7 +8,7 @@
/* FIXME: Here we assume that the timer is gettimeofday. */
-void HYDU_Time_set(HYD_Time * time, int * val)
+void HYDU_Time_set(HYD_Time * time, int *val)
{
if (val == NULL) {
/* Set time to right now */
@@ -40,7 +40,7 @@
time_left = 0;
}
-fn_exit:
+ fn_exit:
HYDU_FUNC_EXIT();
return time_left;
}
More information about the mpich2-commits
mailing list