1
1

Fix Coverity CIDs 1338021, 1338020, 1338019, 1338018.

Этот коммит содержится в:
George Bosilca 2015-11-02 12:54:31 -05:00
родитель 8032ddd4ca
Коммит 5c60e76669
3 изменённых файлов: 8 добавлений и 7 удалений

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

@ -84,9 +84,10 @@ int mca_pml_monitoring_add_procs(struct ompi_proc_t **procs,
key = *((uint64_t*)&tmp);
/* store the rank (in COMM_WORLD) of the process
with its name (a uniq opal ID) as key in the hash table*/
opal_hash_table_set_value_uint64(translation_ht,
key,
(void*)(uintptr_t)i);
if( OPAL_SUCCESS != opal_hash_table_set_value_uint64(translation_ht,
key, (void*)(uintptr_t)i) ) {
return OMPI_ERR_OUT_OF_RESOURCE; /* failed to allocate memory or growing the hash table */
}
}
}
return pml_selected_module.pml_add_procs(procs, nprocs);

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

@ -151,8 +151,8 @@ static int mca_pml_monitoring_component_close(void)
*/
if( mca_pml_monitoring_active ) { /* Already active, turn off */
pml_selected_component.pmlm_version.mca_close_component();
memset(&pml_selected_component, 0, sizeof(mca_base_component_t));
memset(&pml_selected_module, 0, sizeof(mca_base_module_t));
memset(&pml_selected_component, 0, sizeof(mca_pml_base_component_t));
memset(&pml_selected_module, 0, sizeof(mca_pml_base_module_t));
mca_base_component_repository_release((mca_base_component_t*)&mca_pml_monitoring_component);
mca_pml_monitoring_active = 0;
return OMPI_SUCCESS;

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

@ -242,9 +242,9 @@ int write_mat(char * filename, uint64_t * mat, unsigned int dim)
for (i = 0; i < comm_world_size; ++i) {
for (j = 0; j < comm_world_size - 1; ++j) {
fprintf(matrix_file, "%u ", mat[i * comm_world_size + j]);
fprintf(matrix_file, "%lu ", mat[i * comm_world_size + j]);
}
fprintf(matrix_file, "%u\n", mat[i * comm_world_size + j]);
fprintf(matrix_file, "%lu\n", mat[i * comm_world_size + j]);
}
fflush(matrix_file);
fclose(matrix_file);