1
1

* a bunch of cleanups to make trivial opal programs valgrind-clean

This commit was SVN r7009.
Этот коммит содержится в:
Brian Barrett 2005-08-24 20:19:36 +00:00
родитель 28f716542e
Коммит 2577ab4722
5 изменённых файлов: 27 добавлений и 17 удалений

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

@ -36,13 +36,6 @@ int opal_paffinity_base_close(void)
opal_paffinity_base_components_opened_valid = false;
}
/* If a selected component is open, close it */
if (opal_paffinity_base_selected) {
opal_paffinity_base_component->paffinityc_version.mca_close_component();
opal_paffinity_base_selected = false;
}
/* All done */
return OPAL_SUCCESS;

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

@ -112,6 +112,8 @@ opal_timer_linux_open(void)
}
}
fclose(fp);
if (0 == opal_timer_linux_freq) {
return OPAL_ERR_NOT_FOUND;
}

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

@ -27,6 +27,7 @@
#include "orte/include/orte_constants.h"
#include "opal/mca/memory/base/base.h"
#include "opal/mca/timer/base/base.h"
#include "opal/mca/paffinity/base/base.h"
/**
* Finalize the OPAL utilities
@ -38,8 +39,12 @@
*/
int opal_finalize(void)
{
/* close high resolution timers */
opal_timer_base_close();
/* close the processor affinity base */
opal_paffinity_base_close();
/* close the memory manager components. Registered hooks can
still be fired any time between now and the call to
opal_mem_free_finalize(), and callbacks from the memory manager
@ -50,17 +55,20 @@ int opal_finalize(void)
/* finalize the mca */
mca_base_close();
/* finalize the output system */
opal_output_finalize();
/* finalize the memory manager / tracker */
opal_mem_free_finalize();
/* finalize the class/object system */
opal_class_finalize();
/* finalize the memory allocator */
opal_malloc_finalize();
/* finalize the output system. This has to come *after* the
malloc code, as the malloc code needs to call into this, but
the malloc code turning off doesn't affect opal_output that
much */
opal_output_finalize();
/* finalize the class/object system */
opal_class_finalize();
return ORTE_SUCCESS;
}

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

@ -72,21 +72,23 @@ int opal_init(void)
/* initialize the memory allocator */
opal_malloc_init();
/* initialize the memory manager / tracker */
opal_mem_free_init();
/* initialize the output system */
opal_output_init();
/* initialize the memory manager / tracker */
opal_mem_free_init();
/* register handler for errnum -> string converstion */
opal_error_register(opal_err2str);
/* initialize the mca */
mca_base_open();
/* open the processor affinity base */
opal_paffinity_base_open();
#if 0
opal_paffinity_base_select();
#endif
/* open the memory manager components. Memory hooks may be
triggered before this (any time after mem_free_init(),

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

@ -114,6 +114,11 @@ static bool syslog_opened = false;
bool opal_output_init(void)
{
int i;
if (initialized) {
return true;
}
for (i = 0; i < OPAL_OUTPUT_MAX_STREAMS; ++i) {
info[i].ldi_used = false;
info[i].ldi_enabled = false;