From 5137e6f8bc6faad37d6de72ea36167628446d71a Mon Sep 17 00:00:00 2001 From: Anton Brekhov Date: Mon, 26 Oct 2020 23:39:54 +0300 Subject: [PATCH 1/2] Update crunch_mpiGraph --- crunch_mpiGraph | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/crunch_mpiGraph b/crunch_mpiGraph index ef4f661..a3a4281 100755 --- a/crunch_mpiGraph +++ b/crunch_mpiGraph @@ -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. @@ -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); } @@ -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) . "];"); From 7ae1797ca905d5c67eb9c976a9d79b7edce30ff4 Mon Sep 17 00:00:00 2001 From: Anton Brekhov Date: Tue, 27 Oct 2020 22:11:44 +0300 Subject: [PATCH 2/2] Update crunch_mpiGraph --- crunch_mpiGraph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crunch_mpiGraph b/crunch_mpiGraph index a3a4281..ce0aca9 100755 --- a/crunch_mpiGraph +++ b/crunch_mpiGraph @@ -756,7 +756,7 @@ sub return_rankmapjs my $rank = ""; foreach my $row (@rows) { 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+)/); } + 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) . "];");