Fix the bookmark system - we now have children being correctly spawned where they should!
Also, I am no longer seeing any issue with the child job spawning its own daemons - this appears to be fixed. We still don't reuse the existing daemons, however, but that will come. This commit was SVN r12229.
Этот коммит содержится в:
родитель
c4b0d0c026
Коммит
ec0bb9ffda
@ -231,11 +231,15 @@ static int map_app_by_slot(
|
||||
}
|
||||
}
|
||||
|
||||
/* if we still have procs to map, or this node is full, move to next node */
|
||||
if (num_alloc < app->num_procs || ORTE_ERR_NODE_FULLY_USED == rc) {
|
||||
cur_node_item = next;
|
||||
/* we move on to the next node in all cases EXCEPT if we came
|
||||
* out of the loop without having taken a full bite AND the
|
||||
* node is NOT max'd out
|
||||
*
|
||||
*/
|
||||
if (i < (num_slots_to_take-1) && ORTE_ERR_NODE_FULLY_USED != rc) {
|
||||
continue;
|
||||
}
|
||||
|
||||
cur_node_item = next;
|
||||
}
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <mpi.h>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
@ -7,12 +9,14 @@ int main(int argc, char* argv[])
|
||||
MPI_Comm parent, child;
|
||||
int rank, size;
|
||||
char hostname[512];
|
||||
pid_t pid;
|
||||
|
||||
MPI_Init(NULL, NULL);
|
||||
MPI_Comm_get_parent(&parent);
|
||||
/* If we get COMM_NULL back, then we're the parent */
|
||||
if (MPI_COMM_NULL == parent) {
|
||||
printf("Parent about to spawn!\n");
|
||||
pid = getpid();
|
||||
printf("Parent [pid %ld] about to spawn!\n", (long)pid);
|
||||
MPI_Comm_spawn(argv[0], MPI_ARGV_NULL, 1, MPI_INFO_NULL,
|
||||
0, MPI_COMM_WORLD, &child, MPI_ERRCODES_IGNORE);
|
||||
printf("Parent done with spawn\n");
|
||||
@ -27,7 +31,8 @@ int main(int argc, char* argv[])
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
MPI_Comm_size(MPI_COMM_WORLD, &size);
|
||||
gethostname(hostname, 512);
|
||||
printf("Hello from the child %d of %d on host %s\n", rank, size, hostname);
|
||||
pid = getpid();
|
||||
printf("Hello from the child %d of %d on host %s pid %ld\n", rank, size, hostname, (long)pid);
|
||||
MPI_Recv(&msg, 1, MPI_INT, 0, 1, parent, MPI_STATUS_IGNORE);
|
||||
printf("Child %d received msg: %d\n", rank, msg);
|
||||
MPI_Comm_disconnect(&parent);
|
||||
|
@ -365,6 +365,15 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
/* output a message indicating we are alive, our name, and our pid
|
||||
* for debugging purposes
|
||||
*/
|
||||
if (orted_globals.debug_daemons) {
|
||||
fprintf(stderr, "Daemon [%ld,%ld,%ld] checking in as pid %ld on host %s\n",
|
||||
ORTE_NAME_ARGS(orte_process_info.my_name), (long)orte_process_info.pid,
|
||||
orte_system_info.nodename);
|
||||
}
|
||||
|
||||
/* setup the thread lock and condition variables */
|
||||
OBJ_CONSTRUCT(&orted_globals.mutex, opal_mutex_t);
|
||||
OBJ_CONSTRUCT(&orted_globals.condition, opal_condition_t);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user