Skip to content

Commit fa04ba9

Browse files
author
rhc54
authored
Merge pull request #2510 from rhc54/topic/cleanup
Fix the session directory cleanup - only remove the jobfam session di…
2 parents b030f9a + af9a55c commit fa04ba9

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

contrib/scaling/scaling.pl

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# globals
1111
my $num_nodes = 2;
1212
my $my_arg;
13-
my $reps = 1;
13+
my $reps = 5;
1414
my $usedvm = 0;
1515
my $usesrun = 0;
1616
my $usempirun = 0;
@@ -19,14 +19,14 @@
1919
my $myapp;
2020
my $runall = 0;
2121
my $rawoutput = 0;
22-
my $myresults;
22+
my $myresults = "myresults";
2323
my @csvrow;
2424

2525
my @tests = qw(/bin/true ./orte_no_op ./mpi_no_op ./mpi_no_op ./mpi_no_op);
2626
my @options = ("", "", "", "-mca mpi_add_procs_cutoff 0 -mca pmix_base_async_modex 1", "-mca mpi_add_procs_cutoff 0 -mca pmix_base_async_modex 1 -mca async_mpi_init 1 -mca async_mpi_finalize 1");
2727
my @starters = qw(mpirun orterun srun aprun);
28-
my @starteroptions = ("-npernode 1 --novm",
29-
"--hnp file:dvm_uri -pernode",
28+
my @starteroptions = ("--map-by node --novm",
29+
"--hnp file:dvm_uri --map-by node",
3030
"--distribution=cyclic",
3131
"-N 1");
3232

@@ -276,7 +276,9 @@ ()
276276
system("rm -f dvm_uri");
277277
}
278278
$cmd = "orte-dvm --report-uri dvm_uri 2>&1 &";
279-
print $cmd . "\n";
279+
if ($myresults) {
280+
print FILE "\n\n$cmd\n";
281+
}
280282
if (!$SHOWME) {
281283
system($cmd);
282284
# wait for the rendezvous file to appear
@@ -288,14 +290,14 @@ ()
288290
}
289291

290292
if ($myresults) {
291-
print FILE "\n\n$starter\n\n";
293+
print FILE "$starter\n\n";
292294
}
293295
my $testnum = 0;
294296
foreach $test (@tests) {
295297
$option = $options[$testnum];
296298
if (-e $test) {
297299
if ($myresults) {
298-
print FILE "#nodes,$test\n";
300+
print FILE "#nodes,$test,$option\n";
299301
}
300302
if (!$SHOWME) {
301303
# pre-position the executable
@@ -341,4 +343,3 @@ ()
341343
if ($myresults) {
342344
close(FILE);
343345
}
344-

orte/util/session_dir.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,14 @@ orte_session_dir_finalize(orte_process_name_t *proc)
463463
false, orte_dir_check_file);
464464
opal_os_dirpath_destroy(orte_process_info.job_session_dir,
465465
false, orte_dir_check_file);
466-
opal_os_dirpath_destroy(orte_process_info.jobfam_session_dir,
467-
false, orte_dir_check_file);
466+
/* only remove the jobfam session dir if we are the
467+
* local daemon and we are finalizing our own session dir */
468+
if ((ORTE_PROC_IS_HNP || ORTE_PROC_IS_DAEMON) &&
469+
(ORTE_PROC_MY_NAME == proc)) {
470+
opal_os_dirpath_destroy(orte_process_info.jobfam_session_dir,
471+
false, orte_dir_check_file);
472+
}
473+
468474
if( NULL != orte_process_info.top_session_dir ){
469475
opal_os_dirpath_destroy(orte_process_info.top_session_dir,
470476
false, orte_dir_check_file);

0 commit comments

Comments
 (0)