1
1

Add a new MPI_Info key to preposition OMPI libraries - implementation underway, but this just defines and passes the new key

This commit was SVN r21425.
Этот коммит содержится в:
Ralph Castain 2009-06-12 17:53:13 +00:00
родитель 170327e575
Коммит 44bb265a52
7 изменённых файлов: 30 добавлений и 5 удалений

Просмотреть файл

@ -659,6 +659,12 @@ static int spawn(int count, char **array_of_commands,
app->preload_binary = true; app->preload_binary = true;
} }
/* check for 'preload_libraries' */
ompi_info_get_bool(array_of_info[i], "ompi_preload_libraries", &local_spawn, &flag);
if ( flag ) {
app->preload_libs = true;
}
/* check for 'preload_files' */ /* check for 'preload_files' */
ompi_info_get (array_of_info[i], "ompi_preload_files", sizeof(cwd) - 1, cwd, &flag); ompi_info_get (array_of_info[i], "ompi_preload_files", sizeof(cwd) - 1, cwd, &flag);
if ( flag ) { if ( flag ) {

Просмотреть файл

@ -176,6 +176,7 @@ int orte_dt_copy_app_context(orte_app_context_t **dest, orte_app_context_t *src,
} }
(*dest)->preload_binary = src->preload_binary; (*dest)->preload_binary = src->preload_binary;
(*dest)->preload_libs = src->preload_libs;
if( NULL != src->preload_files) { if( NULL != src->preload_files) {
(*dest)->preload_files = strdup(src->preload_files); (*dest)->preload_files = strdup(src->preload_files);

Просмотреть файл

@ -631,14 +631,14 @@ int orte_dt_pack_app_context(opal_buffer_t *buffer, const void *src,
} }
if (ORTE_SUCCESS != (rc = opal_dss_pack_buffer(buffer, if (ORTE_SUCCESS != (rc = opal_dss_pack_buffer(buffer,
(void*)(&have_prefix), 1, OPAL_INT8))) { (void*)(&have_prefix), 1, OPAL_INT8))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
return rc; return rc;
} }
if (have_prefix) { if (have_prefix) {
if (ORTE_SUCCESS != (rc = opal_dss_pack_buffer(buffer, if (ORTE_SUCCESS != (rc = opal_dss_pack_buffer(buffer,
(void*)(&(app_context[i]->prefix_dir)), 1, OPAL_STRING))) { (void*)(&(app_context[i]->prefix_dir)), 1, OPAL_STRING))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
return rc; return rc;
} }
@ -650,6 +650,12 @@ int orte_dt_pack_app_context(opal_buffer_t *buffer, const void *src,
return rc; return rc;
} }
if (ORTE_SUCCESS != (rc = opal_dss_pack_buffer(buffer,
(void*)(&(app_context[i]->preload_libs)), 1, OPAL_BOOL))) {
ORTE_ERROR_LOG(rc);
return rc;
}
/* Pack the preload_files if we have one */ /* Pack the preload_files if we have one */
if (NULL != app_context[i]->preload_files) { if (NULL != app_context[i]->preload_files) {
have_preload_files = 1; have_preload_files = 1;

Просмотреть файл

@ -554,8 +554,9 @@ int orte_dt_print_app_context(char **output, char *prefix, orte_app_context_t *s
tmp = tmp2; tmp = tmp2;
} }
asprintf(&tmp2, "%s\n%s\tPreload binary: %s\tUsed on node: %s\n%s\tPreload files dest: %s\n%s\tPreload files src dir: %s", tmp, asprintf(&tmp2, "%s\n%s\tPreload binary: %s\tPreload libs: %s\tUsed on node: %s\n%s\tPreload files dest: %s\n%s\tPreload files src dir: %s", tmp,
pfx2, (src->preload_binary) ? "TRUE" : "FALSE", (src->used_on_node) ? "TRUE" : "FALSE", pfx2, (src->preload_binary) ? "TRUE" : "FALSE", (src->preload_libs) ? "TRUE" : "FALSE",
(src->used_on_node) ? "TRUE" : "FALSE",
pfx2, (NULL == src->preload_files_dest_dir) ? "NULL" : src->preload_files_dest_dir, pfx2, (NULL == src->preload_files_dest_dir) ? "NULL" : src->preload_files_dest_dir,
pfx2, (NULL == src->preload_files_src_dir) ? "NULL" : src->preload_files_src_dir); pfx2, (NULL == src->preload_files_src_dir) ? "NULL" : src->preload_files_src_dir);
free(tmp); free(tmp);

Просмотреть файл

@ -717,6 +717,14 @@ int orte_dt_unpack_app_context(opal_buffer_t *buffer, void *dest,
return rc; return rc;
} }
/* Unpack the preload_libs flag */
max_n=1;
if (ORTE_SUCCESS != (rc = opal_dss_unpack_buffer(buffer, &(app_context[i]->preload_libs),
&max_n, OPAL_BOOL))) {
ORTE_ERROR_LOG(rc);
return rc;
}
/* Unpack the preload_files set */ /* Unpack the preload_files set */
max_n=1; max_n=1;
if (ORTE_SUCCESS != (rc = opal_dss_unpack_buffer(buffer, &have_preload_files, if (ORTE_SUCCESS != (rc = opal_dss_unpack_buffer(buffer, &have_preload_files,

Просмотреть файл

@ -496,7 +496,8 @@ static void orte_app_context_destructor(orte_app_context_t* app_context)
} }
app_context->preload_binary = false; app_context->preload_binary = false;
app_context->preload_libs = false;
if(NULL != app_context->preload_files) { if(NULL != app_context->preload_files) {
free(app_context->preload_files); free(app_context->preload_files);
} }

Просмотреть файл

@ -171,6 +171,8 @@ typedef struct {
char *prefix_dir; char *prefix_dir;
/** Preload the binary on the remote machine (in PLM via FileM) */ /** Preload the binary on the remote machine (in PLM via FileM) */
bool preload_binary; bool preload_binary;
/** Preload the libraries on the remote machine (in PLM via FileM) */
bool preload_libs;
/** Preload the comma separated list of files to the remote machines cwd */ /** Preload the comma separated list of files to the remote machines cwd */
char * preload_files; char * preload_files;
/** Destination directory for the preloaded files /** Destination directory for the preloaded files