Ensure we cleanup some files so session dirs can be rolled up
cmr=v1.8.2:reviewer=jsquyres This commit was SVN r31569.
This commit is contained in:
parent
751b4325b3
commit
7a79b25577
@ -1081,15 +1081,17 @@ int orterun(int argc, char *argv[])
|
||||
/* ensure all local procs are dead */
|
||||
orte_odls.kill_local_procs(NULL);
|
||||
|
||||
DONE:
|
||||
/* if it was created, remove the debugger attach fifo */
|
||||
if (fifo_active) {
|
||||
opal_event_del(attach);
|
||||
free(attach);
|
||||
if (0 <= attach_fd) {
|
||||
if (fifo_active) {
|
||||
opal_event_del(attach);
|
||||
free(attach);
|
||||
}
|
||||
close(attach_fd);
|
||||
unlink(MPIR_attach_fifo);
|
||||
}
|
||||
|
||||
DONE:
|
||||
/* cleanup and leave */
|
||||
orte_finalize();
|
||||
|
||||
|
@ -677,11 +677,20 @@ CLEANUP:
|
||||
static bool
|
||||
orte_dir_check_file(const char *root, const char *path)
|
||||
{
|
||||
struct stat st;
|
||||
char *fullpath;
|
||||
|
||||
/*
|
||||
* Keep:
|
||||
* - files starting with "output-"
|
||||
* - non-zero files starting with "output-"
|
||||
*/
|
||||
if (0 == strncmp(path, "output-", strlen("output-"))) {
|
||||
fullpath = opal_os_path(false, &fullpath, root, path, NULL);
|
||||
stat(fullpath, &st);
|
||||
free(fullpath);
|
||||
if (0 == st.st_size) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -691,14 +700,23 @@ orte_dir_check_file(const char *root, const char *path)
|
||||
static bool
|
||||
orte_dir_check_file_output(const char *root, const char *path)
|
||||
{
|
||||
struct stat st;
|
||||
char *fullpath;
|
||||
|
||||
/*
|
||||
* Keep:
|
||||
* - files starting with "output-"
|
||||
* - non-zero files starting with "output-"
|
||||
*/
|
||||
if( 0 == strncmp(path, "output-", strlen("output-"))) {
|
||||
if (0 == strncmp(path, "output-", strlen("output-"))) {
|
||||
fullpath = opal_os_path(false, &fullpath, root, path, NULL);
|
||||
stat(fullpath, &st);
|
||||
free(fullpath);
|
||||
if (0 == st.st_size) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user