diff --git a/contrib/update-my-copyright.pl b/contrib/update-my-copyright.pl index 2bfe9f36a49..3ac826bfa32 100755 --- a/contrib/update-my-copyright.pl +++ b/contrib/update-my-copyright.pl @@ -128,31 +128,13 @@ sub quiet_print { # Find the top-level source tree dir in a git repo my $start = cwd(); -my $top = $start; -while (! -d "$top/.git") { - chdir(".."); - $top = cwd(); - die "Can't find top-level repository directory" - if ($top eq "/"); -} -chdir($start); +my $top = `git rev-parse --show-toplevel`; +chomp($top); quiet_print "==> Top-level repository dir: $top\n"; quiet_print "==> Current directory: $start\n"; -# Select VCS used to obtain modification info. Choose in increasing priority -# order (last hit wins). -my $vcs; -$vcs = "git" - if (-d "$top/.git"); -$vcs = "hg" - if (-d "$top/.hg"); -$vcs = "svn" - if (-d "$top/.svn"); -$vcs = "manual" - if ("$my_manual_list" ne ""); - -my @files = find_modified_files($vcs); +my @files = find_modified_files(); if ($#files < 0) { quiet_print "No added / changed files -- nothing to do\n"; @@ -284,98 +266,65 @@ sub quiet_print { #------------------------------------------------------------------------------- -# Takes two arguments, the top level directory and the VCS method. Returns a -# list of file names (relative to pwd) which the VCS considers to be modified. +# Returns a list of file names (relative to pwd) which git considers +# to be modified. sub find_modified_files { - my $vcs = shift; my @files = (); - if ($vcs eq "git") { - # Number of path entries to remove from ${top}-relative paths. - # (--show-cdup either returns the empty string or sequence of "../" - # entries, always ending in a "/") - my $n_strip = scalar(split(m!/!, scalar(`git rev-parse --show-cdup`))) - 1; - - # "." restricts scope, but does not get us relative path names - my $cmd = "git status -z --porcelain --untracked-files=no ."; - quiet_print "==> Running: \"$cmd\"\n"; - my $lines = `$cmd`; - - # From git-status(1): - # X Y Meaning - # ------------------------------------------------- - # [MD] not updated - # M [ MD] updated in index - # A [ MD] added to index - # D [ M] deleted from index - # R [ MD] renamed in index - # C [ MD] copied in index - # [MARC] index and work tree matches - # [ MARC] M work tree changed since index - # [ MARC] D deleted in work tree - # ------------------------------------------------- - # D D unmerged, both deleted - # A U unmerged, added by us - # U D unmerged, deleted by them - # U A unmerged, added by them - # D U unmerged, deleted by us - # A A unmerged, both added - # U U unmerged, both modified - # ------------------------------------------------- - # ? ? untracked - # ------------------------------------------------- - foreach my $line (split /\x{00}/, $lines) { - my $keep = 0; - my ($s1, $s2, $fullname) = $line =~ m/^(.)(.) (.*)$/; - - # ignore all merge cases - next if ($s1 eq "D" and $s2 eq "D"); - next if ($s1 eq "A" and $s2 eq "A"); - next if ($s1 eq "U" or $s2 eq "U"); - - # only update for actually added/modified cases, no copies, - # renames, etc. - $keep = 1 if ($s1 eq "M" or $s2 eq "M"); - $keep = 1 if ($s1 eq "A"); - - if ($keep) { - my $relname = $fullname; - $relname =~ s!^([^/]*/){$n_strip}!!g; - - push @files, $relname - if (-f $relname); - } - } - } - elsif ($vcs eq "hg" or $vcs eq "svn") { - my $cmd = "$vcs st ."; - - # Run the command, parsing the output. Make a list of files that are - # added or modified. - quiet_print "==> Running: \"$cmd\"\n"; - open(CMD, "$cmd|") || die "Can't run command"; - while () { - chomp; - if ($_ =~ /^M/ || $_ =~ /^A/) { - my @tokens = split(/\s+/, $_); - # Handle output of both forms: - # M filenameA - # A + filenameB - my $filename = $tokens[1]; - $filename = $tokens[2] - if ($tokens[1] =~ /\+/); - # Don't bother saving directory names - push(@files, $filename) - if (-f $filename); - } + # Number of path entries to remove from ${top}-relative paths. + # (--show-cdup either returns the empty string or sequence of "../" + # entries, always ending in a "/") + my $n_strip = scalar(split(m!/!, scalar(`git rev-parse --show-cdup`))) - 1; + + # "." restricts scope, but does not get us relative path names + my $cmd = "git status -z --porcelain --untracked-files=no ."; + quiet_print "==> Running: \"$cmd\"\n"; + my $lines = `$cmd`; + + # From git-status(1): + # X Y Meaning + # ------------------------------------------------- + # [MD] not updated + # M [ MD] updated in index + # A [ MD] added to index + # D [ M] deleted from index + # R [ MD] renamed in index + # C [ MD] copied in index + # [MARC] index and work tree matches + # [ MARC] M work tree changed since index + # [ MARC] D deleted in work tree + # ------------------------------------------------- + # D D unmerged, both deleted + # A U unmerged, added by us + # U D unmerged, deleted by them + # U A unmerged, added by them + # D U unmerged, deleted by us + # A A unmerged, both added + # U U unmerged, both modified + # ------------------------------------------------- + # ? ? untracked + # ------------------------------------------------- + foreach my $line (split /\x{00}/, $lines) { + my $keep = 0; + my ($s1, $s2, $fullname) = $line =~ m/^(.)(.) (.*)$/; + + # ignore all merge cases + next if ($s1 eq "D" and $s2 eq "D"); + next if ($s1 eq "A" and $s2 eq "A"); + next if ($s1 eq "U" or $s2 eq "U"); + + # only update for actually added/modified cases, no copies, + # renames, etc. + $keep = 1 if ($s1 eq "M" or $s2 eq "M"); + $keep = 1 if ($s1 eq "A"); + + if ($keep) { + my $relname = $fullname; + $relname =~ s!^([^/]*/){$n_strip}!!g; + + push @files, $relname + if (-f $relname); } - close(CMD); - } - elsif ($vcs eq "manual") { - @files = split(/\n/, `cat $my_manual_list`); - } - else { - die "unknown VCS '$vcs', stopped"; } return @files; diff --git a/docs/tuning-apps/networking/tcp.rst b/docs/tuning-apps/networking/tcp.rst index 07dc893e036..5e61e024fa0 100644 --- a/docs/tuning-apps/networking/tcp.rst +++ b/docs/tuning-apps/networking/tcp.rst @@ -247,20 +247,16 @@ not use specific IP networks |mdash| or not use any IP networks at all .. warning:: If you use the ``btl_tcp_if_include`` and ``btl_tcp_if_exclude`` MCA parameters to shape the behavior of the TCP BTL for MPI communications, you may - also need/want to investigate the corresponding MCA - parameters ``oob_tcp_if_include`` and - ``oob_tcp_if_exclude``, which are used to shape non-MPI - TCP-based communication (e.g., communications setup and - coordination during ``MPI_INIT`` and ``MPI_FINALIZE``). - -.. error:: TODO do corresponding OOB TCP params still exist in PMIx? - -Note that Open MPI will still use TCP for control messages, such as -data between ``mpirun`` and the MPI processes, rendezvous information -during ``MPI_INIT``, etc. To disable TCP altogether, you also need to -disable the ``tcp`` component from the OOB framework. - -.. error:: TODO Is this possible in PMIx? I doubt it...? + also need/want to investigate the corresponding PRRTE + parameters that control use of network interfaces by the + runtime (e.g., communications setup and coordination + during :ref:`MPI_Init` and :ref:`MPI_Finalize`) using the + ``prte_info(1)`` and ``pmix_info(1)`` commands. + +Note that the Open MPI runtime uses TCP for control messages, such as +for data exchange between ``mpirun(1)`` and the MPI processes, +rendezvous information during :ref:`MPI_Init`, etc. even if the +``tcp`` BTL component is disabled. /////////////////////////////////////////////////////////////////////////