Skip to content

Commit 7ab26a4

Browse files
author
Ralph Castain
authored
Merge pull request #2878 from rhc54/topic/scaling
Add new platform files. Modify scaling.pl to support ppn option
2 parents 048d47d + 28abe78 commit 7ab26a4

File tree

5 files changed

+235
-57
lines changed

5 files changed

+235
-57
lines changed

contrib/platform/intel/bend/gadget

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
enable_orterun_prefix_by_default=yes
2+
enable_mpi_thread_multiple=no
3+
enable_mem_debug=no
4+
enable_mem_profile=no
5+
enable_debug_symbols=yes
6+
enable_binaries=yes
7+
enable_heterogeneous=no
8+
enable_picky=yes
9+
enable_debug=yes
10+
enable_shared=yes
11+
enable_static=no
12+
enable_memchecker=no
13+
enable_ipv6=no
14+
enable_mpi_fortran=no
15+
enable_mpi_cxx=no
16+
enable_mpi_cxx_seek=no
17+
enable_cxx_exceptions=no
18+
enable_oshmem=no
19+
enable_mpi_java=no
20+
enable_io_romio=no
21+
enable_contrib_no_build=libnbc
22+
with_memory_manager=no
23+
with_tm=no
24+
with_verbs=no
25+
with_devel_headers=yes
26+
with_portals=no
27+
with_valgrind=no
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
enable_orterun_prefix_by_default=yes
2+
enable_mpi_thread_multiple=no
3+
enable_mem_debug=no
4+
enable_mem_profile=no
5+
enable_debug_symbols=no
6+
enable_binaries=yes
7+
enable_heterogeneous=no
8+
enable_picky=yes
9+
enable_debug=no
10+
enable_shared=yes
11+
enable_static=no
12+
enable_memchecker=no
13+
enable_ipv6=no
14+
enable_mpi_fortran=no
15+
enable_mpi_cxx=no
16+
enable_mpi_cxx_seek=no
17+
enable_cxx_exceptions=no
18+
enable_oshmem=no
19+
enable_mpi_java=no
20+
enable_io_romio=no
21+
enable_contrib_no_build=libnbc
22+
with_memory_manager=no
23+
with_tm=no
24+
with_verbs=no
25+
with_devel_headers=yes
26+
with_portals=no
27+
with_valgrind=no
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#
2+
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3+
# University Research and Technology
4+
# Corporation. All rights reserved.
5+
# Copyright (c) 2004-2005 The University of Tennessee and The University
6+
# of Tennessee Research Foundation. All rights
7+
# reserved.
8+
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9+
# University of Stuttgart. All rights reserved.
10+
# Copyright (c) 2004-2005 The Regents of the University of California.
11+
# All rights reserved.
12+
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
13+
# Copyright (c) 2017 Intel, Inc. All rights reserved.
14+
# $COPYRIGHT$
15+
#
16+
# Additional copyrights may follow
17+
#
18+
# $HEADER$
19+
#
20+
21+
# This is the default system-wide MCA parameters defaults file.
22+
# Specifically, the MCA parameter "mca_param_files" defaults to a
23+
# value of
24+
# "$HOME/.openmpi/mca-params.conf:$sysconf/openmpi-mca-params.conf"
25+
# (this file is the latter of the two). So if the default value of
26+
# mca_param_files is not changed, this file is used to set system-wide
27+
# MCA parameters. This file can therefore be used to set system-wide
28+
# default MCA parameters for all users. Of course, users can override
29+
# these values if they want, but this file is an excellent location
30+
# for setting system-specific MCA parameters for those users who don't
31+
# know / care enough to investigate the proper values for them.
32+
33+
# Note that this file is only applicable where it is visible (in a
34+
# filesystem sense). Specifically, MPI processes each read this file
35+
# during their startup to determine what default values for MCA
36+
# parameters should be used. mpirun does not bundle up the values in
37+
# this file from the node where it was run and send them to all nodes;
38+
# the default value decisions are effectively distributed. Hence,
39+
# these values are only applicable on nodes that "see" this file. If
40+
# $sysconf is a directory on a local disk, it is likely that changes
41+
# to this file will need to be propagated to other nodes. If $sysconf
42+
# is a directory that is shared via a networked filesystem, changes to
43+
# this file will be visible to all nodes that share this $sysconf.
44+
45+
# The format is straightforward: one per line, mca_param_name =
46+
# rvalue. Quoting is ignored (so if you use quotes or escape
47+
# characters, they'll be included as part of the value). For example:
48+
49+
# Disable run-time MPI parameter checking
50+
# mpi_param_check = 0
51+
52+
# Note that the value "~/" will be expanded to the current user's home
53+
# directory. For example:
54+
55+
# Change component loading path
56+
# component_path = /usr/local/lib/openmpi:~/my_openmpi_components
57+
58+
# See "ompi_info --param all all" for a full listing of Open MPI MCA
59+
# parameters available and their default values.
60+
#
61+
62+
# Basic behavior to smooth startup
63+
mca_base_component_show_load_errors = 1
64+
orte_abort_timeout = 10
65+
hwloc_base_mem_bind_failure_action = silent
66+
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#
2+
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3+
# University Research and Technology
4+
# Corporation. All rights reserved.
5+
# Copyright (c) 2004-2005 The University of Tennessee and The University
6+
# of Tennessee Research Foundation. All rights
7+
# reserved.
8+
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9+
# University of Stuttgart. All rights reserved.
10+
# Copyright (c) 2004-2005 The Regents of the University of California.
11+
# All rights reserved.
12+
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
13+
# Copyright (c) 2017 Intel, Inc. All rights reserved.
14+
# $COPYRIGHT$
15+
#
16+
# Additional copyrights may follow
17+
#
18+
# $HEADER$
19+
#
20+
21+
# This is the default system-wide MCA parameters defaults file.
22+
# Specifically, the MCA parameter "mca_param_files" defaults to a
23+
# value of
24+
# "$HOME/.openmpi/mca-params.conf:$sysconf/openmpi-mca-params.conf"
25+
# (this file is the latter of the two). So if the default value of
26+
# mca_param_files is not changed, this file is used to set system-wide
27+
# MCA parameters. This file can therefore be used to set system-wide
28+
# default MCA parameters for all users. Of course, users can override
29+
# these values if they want, but this file is an excellent location
30+
# for setting system-specific MCA parameters for those users who don't
31+
# know / care enough to investigate the proper values for them.
32+
33+
# Note that this file is only applicable where it is visible (in a
34+
# filesystem sense). Specifically, MPI processes each read this file
35+
# during their startup to determine what default values for MCA
36+
# parameters should be used. mpirun does not bundle up the values in
37+
# this file from the node where it was run and send them to all nodes;
38+
# the default value decisions are effectively distributed. Hence,
39+
# these values are only applicable on nodes that "see" this file. If
40+
# $sysconf is a directory on a local disk, it is likely that changes
41+
# to this file will need to be propagated to other nodes. If $sysconf
42+
# is a directory that is shared via a networked filesystem, changes to
43+
# this file will be visible to all nodes that share this $sysconf.
44+
45+
# The format is straightforward: one per line, mca_param_name =
46+
# rvalue. Quoting is ignored (so if you use quotes or escape
47+
# characters, they'll be included as part of the value). For example:
48+
49+
# Disable run-time MPI parameter checking
50+
# mpi_param_check = 0
51+
52+
# Note that the value "~/" will be expanded to the current user's home
53+
# directory. For example:
54+
55+
# Change component loading path
56+
# component_path = /usr/local/lib/openmpi:~/my_openmpi_components
57+
58+
# See "ompi_info --param all all" for a full listing of Open MPI MCA
59+
# parameters available and their default values.
60+
#
61+
62+
# Basic behavior to smooth startup
63+
mca_base_component_show_load_errors = 1
64+
orte_abort_timeout = 10
65+
hwloc_base_mem_bind_failure_action = silent
66+

contrib/scaling/scaling.pl

Lines changed: 49 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@
2020
my $runall = 0;
2121
my $rawoutput = 0;
2222
my $myresults = "myresults";
23+
my $ppn = 1;
2324
my @csvrow;
2425

2526
my @tests = qw(/bin/true ./orte_no_op ./mpi_no_op ./mpi_no_op ./mpi_no_op);
2627
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");
27-
my @starters = qw(mpirun orterun srun aprun);
28-
my @starteroptions = ("--pernode --novm",
29-
"--hnp file:dvm_uri --pernode",
30-
"--distribution=cyclic",
31-
"-N 1");
28+
my @starterlist = qw(mpirun orterun srun aprun);
29+
my @starteroptionlist = ("--novm",
30+
"--hnp file:dvm_uri",
31+
"--distribution=cyclic -N",
32+
"-N");
3233

3334
# Set to true if the script should merely print the cmds
3435
# it would run, but don't run them
@@ -51,6 +52,7 @@
5152
"all" => \$runall,
5253
"results=s" => \$myresults,
5354
"rawout" => \$rawoutput,
55+
"ppn=s" => \$ppn,
5456
) or die "unable to parse options, stopped";
5557

5658
if ($HELP) {
@@ -60,14 +62,15 @@
6062
--quiet | -q Only output critical messages to stdout
6163
--showme Show the actual commands without executing them
6264
--reps=s Number of times to run each test (for statistics)
63-
--mpirun Use only mpirun (or its equivalent orterun)
64-
--dvm Use only orte-dvm to execute the test
65-
--srun Use only srun (if available) to execute the test
66-
--arpun Use only aprun (if available) to execute the test
65+
--mpirun Use mpirun (or its equivalent orterun)
66+
--dvm Use orte-dvm to execute the test
67+
--srun Use srun (if available) to execute the test
68+
--arpun Use aprun (if available) to execute the test
6769
--myapp=s In addition to the standard tests, run this specific application (including any args)
6870
--all Use all available start commands [default]
6971
--results=file File where results are to stored in comma-separated value format
7072
--rawout Provide raw timing output to the file
73+
--ppn=n Run n procs/node
7174
";
7275
exit(0);
7376
}
@@ -84,50 +87,48 @@
8487
my $idx;
8588
my $option;
8689
my $havedvm = 0;
90+
my @starters;
91+
my @starteroptions;
92+
93+
# if they asked for all, then set all starters to requested
94+
if ($runall) {
95+
$useaprun = 1;
96+
$usempirun = 1;
97+
$usesrun = 1;
98+
$usedvm = 1;
99+
}
87100

88101
# see which starters are available
89102
my @path = split(":", $ENV{PATH});
90103
my $exists = 0;
104+
my $opt;
91105
$idx=0;
92-
while ($idx <= $#starters) {
93-
$starter = $starters[$idx];
106+
foreach $starter (@starterlist) {
94107
$exists = 0;
95108
foreach my $path (@path) {
96109
if ( -x "$path/$starter") {
97110
$exists = 1;
98111
last;
99112
}
100113
}
101-
unless ($exists) {
102-
# remove this one from the list
103-
splice @starters, $idx, 1;
104-
splice @starteroptions, $idx, 1;
105-
# adjust the index
106-
$idx = $idx - 1;
107-
} elsif ($usedvm && $starter ne "orterun") {
108-
# remove this one from the list
109-
splice @starters, $idx, 1;
110-
splice @starteroptions, $idx, 1;
111-
# adjust the index
112-
$idx = $idx - 1;
113-
} elsif ($usesrun && $starter ne "srun") {
114-
# remove this one from the list
115-
splice @starters, $idx, 1;
116-
splice @starteroptions, $idx, 1;
117-
# adjust the index
118-
$idx = $idx - 1;
119-
} elsif ($useaprun && $starter ne "aprun") {
120-
# remove this one from the list
121-
splice @starters, $idx, 1;
122-
splice @starteroptions, $idx, 1;
123-
# adjust the index
124-
$idx = $idx - 1;
125-
} elsif ($usempirun && $starter ne "mpirun") {
126-
# remove this one from the list
127-
splice @starters, $idx, 1;
128-
splice @starteroptions, $idx, 1;
129-
# adjust the index
130-
$idx = $idx - 1;
114+
if ($exists) {
115+
if ($usedvm && $starter eq "orterun") {
116+
push @starters, $starter;
117+
$opt = $starteroptionlist[$idx] . " --npernode " . $ppn;
118+
push @starteroptions, $opt;
119+
} elsif ($usempirun && $starter eq "mpirun") {
120+
push @starters, $starter;
121+
$opt = $starteroptionlist[$idx] . " --npernode " . $ppn;
122+
push @starteroptions, $opt;
123+
} elsif ($useaprun && $starter eq "aprun") {
124+
push @starters, $starter;
125+
$opt = $starteroptionlist[$idx] . " " . $ppn;
126+
push @starteroptions, $opt;
127+
} elsif ($usesrun && $starter eq "srun") {
128+
push @starters, $starter;
129+
$opt = $starteroptionlist[$idx] . " " . $ppn;
130+
push @starteroptions, $opt;
131+
}
131132
}
132133
$idx = $idx + 1;
133134
}
@@ -150,39 +151,29 @@
150151

151152
# determine the number of nodes - doesn't
152153
# matter which starter we use
153-
$cmd = $starters[0] . " " . $starteroptions[0] . " hostname";
154-
print "CMD: $cmd\n";
154+
$cmd = "mpirun --novm --pernode hostname";
155155
$output = `$cmd`;
156-
print "$output\n";
157156
@lines = split(/\n/, $output);
158157
$num_nodes = $#lines + 1;
159158

160-
# collect the complete list of starters
161-
my $mystarters;
162-
$idx=1;
163-
$mystarters = $starters[0];
164-
while ($idx < $#starters) {
165-
$mystarters = $mystarters . "," . $starters[$idx];
166-
$idx = $idx + 1;
167-
}
168-
169159
# get the local date and time
170160
my ($sec,$min,$hour,$day,$month,$yr19,@rest) = localtime(time);
171161

162+
my $pstarts = join(", ", @starters);
172163
# start by printing out the resulting configuration
173164
print "\n--------------------------------------------------\n";
174165
print "\nTest configuration:\n";
175166
print "\tDate:\t" . "$day-".++$month. "-".($yr19+1900) . " " . sprintf("%02d",$hour).":".sprintf("%02d",$min).":".sprintf("%02d",$sec) . "\n";;
176167
print "\tNum nodes:\t" . $num_nodes . "\n";
177-
print "\tStarters:\t" . $mystarters . "\n";
168+
print "\tStarters:\t" . $pstarts . "\n";
178169
print "\n--------------------------------------------------\n";
179170

180171
# and tag the output file as well
181172
if ($myresults) {
182173
print FILE "Test configuration:\n";
183174
print FILE "Date:\t" . "$day-".++$month. "-".($yr19+1900) . " " . sprintf("%02d",$hour).":".sprintf("%02d",$min).":".sprintf("%02d",$sec) . "\n";;
184175
print FILE "Num nodes:\t" . $num_nodes . "\n";
185-
print FILE "Starters:\t" . $mystarters . "\n";
176+
print FILE "Starters:\t" . $pstarts . "\n";
186177
}
187178

188179
my $index = 0;
@@ -268,6 +259,7 @@ ()
268259
}
269260

270261
foreach $starter (@starters) {
262+
print "STARTER: $starter\n";
271263
# if we are going to use the dvm, then we
272264
if ($starter eq "orterun") {
273265
# need to start it
@@ -289,7 +281,7 @@ ()
289281
}
290282

291283
if ($myresults) {
292-
print FILE "$starter\n\n";
284+
print FILE "$starter $starteroptions[$index]\n\n";
293285
}
294286
my $testnum = 0;
295287
foreach $test (@tests) {
@@ -306,7 +298,7 @@ ()
306298
$n = 1;
307299
while ($n <= $num_nodes) {
308300
push @csvrow,$n;
309-
$cmd = "time " . $starter . " " . $starteroptions[$index] . " -n $n $option $test 2>&1";
301+
$cmd = "time " . $starter . " " . $starteroptions[$index] . " $option $test 2>&1";
310302
print $cmd . "\n";
311303
if (!$SHOWME) {
312304
runcmd();

0 commit comments

Comments
 (0)