We need to update both context->app and context->argv[0] with the new path when we use --preload-binary. This keeps orte from checking the wrong path later in the odls [orte_util_check_context_app() called from odls_base_default_setup_fork()].
Refs trac:1770 This commit was SVN r20321. The following Trac tickets were found above: Ticket 1770 --> https://svn.open-mpi.org/trac/ompi/ticket/1770
Этот коммит содержится в:
родитель
6d805eb0dd
Коммит
d066c67b53
@ -168,15 +168,21 @@ static int orte_odls_base_preload_append_binary(orte_app_context_t* context,
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
/*
|
/*
|
||||||
* Adjust the process name to point to the new local version
|
* Adjust the process name to point to the new local version (and argv[0])
|
||||||
*/
|
*/
|
||||||
if( NULL != local_bin ) {
|
if( NULL != local_bin ) {
|
||||||
if(NULL != context->app) {
|
if(NULL != context->app) {
|
||||||
free(context->app);
|
free(context->app);
|
||||||
context->app = NULL;
|
context->app = NULL;
|
||||||
}
|
}
|
||||||
|
if(NULL != context->argv[0]) {
|
||||||
|
free(context->argv[0]);
|
||||||
|
context->argv[0] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
context->app = strdup(local_bin);
|
||||||
|
context->argv[0] = strdup(local_bin);
|
||||||
|
|
||||||
context->app = strdup(local_bin);
|
|
||||||
free(local_bin);
|
free(local_bin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user