Skip to content

Commit

Permalink
open-mpi: avoid conflict with putty
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m committed Dec 29, 2024
1 parent bb1e707 commit 0a60246
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Formula/o/open-mpi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,21 @@ def install

# Avoid references to cellar paths.
inreplace (lib/"pkgconfig").glob("*.pc"), prefix, opt_prefix, audit_result: false

# Avoid conflict with PuTTY similar to Arch Linux[^1]. May be able to remove with PRRTE v4[^2]
#
# [^1]: https://gitlab.archlinux.org/archlinux/packaging/packages/prrte/-/blob/main/PKGBUILD?ref_type=heads#L98
# [^2]: https://github.com/openpmix/prrte/issues/1836
bin.install bin/"pterm" => "prrte-pterm"
man1.install man1/"pterm.1" => "prrte-pterm.1"
end

def caveats
"`pterm` has been renamed to `prrte-pterm` to avoid conflict with `putty`"
end

test do
(testpath/"hello.c").write <<~C
(testpath/"hello.c").write <<~'C'
#include <mpi.h>
#include <stdio.h>
Expand All @@ -97,7 +108,7 @@ def install
MPI_Comm_size(MPI_COMM_WORLD, &size);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Get_processor_name(name, &nameLen);
printf("[%d/%d] Hello, world! My name is %s.\\n", rank, size, name);
printf("[%d/%d] Hello, world! My name is %s.\n", rank, size, name);
MPI_Finalize();
return 0;
}
Expand Down

0 comments on commit 0a60246

Please sign in to comment.