Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions crunch_mpiGraph
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright notice, this
# â* Redistributions of source code must retain the above copyright notice, this
# list of conditions and the disclaimer below.
# * Redistributions in binary form must reproduce the above copyright notice,
# â* Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the disclaimer (as noted below) in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of the LLNL nor the names of its contributors may be used to
# â* Neither the name of the LLNL nor the names of its contributors may be used to
# endorse or promote products derived from this software without specific prior
# written permission.
# *
# â*
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
Expand Down Expand Up @@ -458,16 +458,16 @@ sub output_rankmap
$rank = -1;
foreach $row (@rows)
{
if ($strip_mpi_rank) { ($node) = ($row =~ /([a-zA-Z]+\d*)/); $rank++; }
else { ($node, $rank) = ($row =~ /([a-zA-Z]+\d*):(\d+)/); }
if ($strip_mpi_rank) { ($node) = ($row =~ /([a-zA-Z]+\d*[a-zA-Z]+\d*)/); $rank++; }
else { ($node, $rank) = ($row =~ /([a-zA-Z]+\d*[a-zA-Z]+\d*):(\d+)/); }
if ($node) {
print MAP "$rank\t$node\n";
push @nodes, $node;
}
}
close(MAP);
# my $nodelist = join(",", @nodes); # if you don't have compress(), use this instead
my $nodelist = hostlist_lite::compress(@nodes);
my $nodelist = join(",", @nodes); # if you don't have compress(), use this instead
# my $nodelist = hostlist_lite::compress(@nodes); # there's no package on metacpan like this
return (scalar(@nodes), $nodelist);
}

Expand Down Expand Up @@ -755,8 +755,8 @@ sub return_rankmapjs
my $node = "";
my $rank = "";
foreach my $row (@rows) {
if ($strip_mpi_rank) { ($node) = ($row =~ /([a-zA-Z\-]+\d*)/); $rank++; }
else { ($node, $rank) = ($row =~ /([a-zA-Z\-]+\d*):(\d+)/); }
if ($strip_mpi_rank) { ($node) = ($row =~ /([a-zA-Z\-]+\d*[a-zA-Z]+\d*)/); $rank++; }
else { ($node, $rank) = ($row =~ /([a-zA-Z\-]+\d*[a-zA-Z]\d*):(\d+)/); }
if ($node) { push @nodes, '"' . $node . '"'; }
}
return (scalar(@nodes), "var rankmap = [" . join(",", @nodes) . "];");
Expand Down