1
1

Do a little better job of cleaning up the session directory left by mpirun by ensuring we delete the event associated with debugger attachment and unlinking the pipe used for that purpose. Also, we no longer leave "abort" files around, so remove that check when deleting session directory trees

cmr=v1.7.5:reviewer=jsquyres:subject=cleanup session directories better

This commit was SVN r30689.
Этот коммит содержится в:
Ralph Castain 2014-02-11 22:16:17 +00:00
родитель fa7b686ccc
Коммит 1565816988
2 изменённых файлов: 12 добавлений и 10 удалений

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

@ -134,6 +134,9 @@ static void orte_debugger_detached(int fd, short event, void *arg);
static void attach_debugger(int fd, short event, void *arg);
static void build_debugger_args(orte_app_context_t *debugger);
static void open_fifo (void);
static int attach_fd = -1;
static bool fifo_active=false;
static opal_event_t *attach=NULL;
ORTE_DECLSPEC void* MPIR_Breakpoint(void);
@ -1055,6 +1058,14 @@ int orterun(int argc, char *argv[])
/* ensure all local procs are dead */
orte_odls.kill_local_procs(NULL);
/* if it was created, remove the debugger attach fifo */
if (fifo_active) {
opal_event_del(attach);
free(attach);
close(attach_fd);
unlink(MPIR_attach_fifo);
}
DONE:
/* cleanup and leave */
orte_finalize();
@ -2539,11 +2550,6 @@ static void run_debugger(char *basename, opal_cmd_line_t *cmd_line,
*/
/* local globals and functions */
static void attach_debugger(int fd, short event, void *arg);
static void build_debugger_args(orte_app_context_t *debugger);
static void open_fifo(void);
static int attach_fd = -1;
static bool fifo_active=false;
#define DUMP_INT(X) fprintf(stderr, " %s = %d\n", # X, X);
#define FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
@ -2960,8 +2966,6 @@ static void orte_debugger_detached(int fd, short event, void *cbdata)
static void open_fifo (void)
{
opal_event_t *attach;
if (attach_fd > 0) {
close(attach_fd);
}

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

@ -673,10 +673,8 @@ orte_dir_check_file(const char *root, const char *path)
/*
* Keep:
* - files starting with "output-"
* - files that indicate abort
*/
if( (0 == strncmp(path, "output-", strlen("output-"))) ||
(0 == strcmp(path, "abort"))) {
if (0 == strncmp(path, "output-", strlen("output-"))) {
return false;
}