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 28, 2024
1 parent aa2d07c commit 67e423b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Formula/o/open-mpi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,18 @@ def install

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

# Avoid conflict with PuTTY using same name as Arch Linux. May be able to remove with PRRTE v4
# Ref: https://gitlab.archlinux.org/archlinux/packaging/packages/prrte/-/blob/main/PKGBUILD?ref_type=heads#L98
# Ref: https://github.com/openpmix/prrte/issues/1836
(libexec/"bin").install bin/"pterm"
(libexec/"man/man1").install man1/"pterm.1"
bin.install_symlink libexec/"bin/pterm" => "prrte-pterm"
man1.install_symlink libexec/"man/man1/pterm.1" => "prrte-pterm.1"
end

test do
(testpath/"hello.c").write <<~C
(testpath/"hello.c").write <<~'C'
#include <mpi.h>
#include <stdio.h>
Expand All @@ -97,7 +105,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 67e423b

Please sign in to comment.