<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/dcc2ab5d0ae8bfbd6b6a476b73386a99a34d5256">https://github.com/macports/macports-ports/commit/dcc2ab5d0ae8bfbd6b6a476b73386a99a34d5256</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit dcc2ab5d0ae8bfbd6b6a476b73386a99a34d5256
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Tue Jan 7 09:10:20 2020 +1100
<span style='display:block; white-space:pre;color:#404040;'> mpi pg: only allow compiler versions that work
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/57415
</span>---
_resources/port1.0/group/mpi-1.0.tcl | 43 +++++++++++++++++++++++++++++++-----
science/mpich/Portfile | 2 ++
science/openmpi/Portfile | 2 ++
3 files changed, 42 insertions(+), 5 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/mpi-1.0.tcl b/_resources/port1.0/group/mpi-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 18685fc..7dd3772 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/mpi-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/mpi-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -225,7 +225,8 @@ proc mpi_variant_isset {} {
</span> }
proc mpi.setup {args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global cdb mpidb mpi.variants mpi.require mpi.default compilers.variants name
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global cdb mpidb mpi.variants mpi.require mpi.default compilers.variants \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ name os.major
</span>
set add_list {}
set remove_list ${mpi.variants}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -279,10 +280,42 @@ proc mpi.setup {args} {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # here we add all compiler variants since we can't dynamically look up
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # which variants are enabled for the mpi ports; instead we'll use active
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # variants to detect an incompatibility
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- compilers.setup {*}$cl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # We can't dynamically look up which variants are enabled for the mpi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # ports. So we'll disable the ones we know aren't supported, try to keep
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # that information synced, and use active variants to detect any
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # incompatibility that may slip through.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cur_variant [mpi_variant_name]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$cur_variant eq "" && ${mpi.default}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cur_variant mpich
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set disabled [list]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$cur_variant ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set is_mpich [expr {$cur_variant in {mpich mpich_devel}}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend disabled -gcc44 -gcc45 -gcc46 -gcc47 -gcc48
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # gcc 4.x not supported on macOS 10.12 (Darwin16) or newer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # clang 3.{3,4} not supported on macOS 10.12 (Darwin16) or newer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} >= 16} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend disabled -gcc49
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} >= 16 || $is_mpich} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend disabled -clang33 -clang34
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # clang 3.7,4.0 not supported on macOS 10.14 (Darwin18) or newer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} >= 18 || $is_mpich} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend disabled -clang37
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # gcc 9+ only available on OS X 10.7 (Darwin11) and newer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} <= 10} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend disabled -gcc9
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # this should probably be changed in mpich but we have to match it
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} <= 12 && $is_mpich} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend disabled -clang60 -clang70 -clang80 -clang90
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compilers.setup {*}$cl {*}$disabled
</span>
# we need to check for a removed variant early so we can exit before
# the wrong variant is passed up the dependency chain
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/science/mpich/Portfile b/science/mpich/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 28fb433..46c4e89 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/science/mpich/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/science/mpich/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -76,6 +76,8 @@ if {[string first "-devel" $subport] > 0} {
</span> # As MPICH creates compiler wrappers, there are lots of
# variants for what compiler the user would like to wrap.
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Please update the mpi portgroup whenever clist is changed.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Sub-ports names and corresponding configure.compiler value
array set clist {
clang {clang}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/science/openmpi/Portfile b/science/openmpi/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 151410a..3915616 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/science/openmpi/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/science/openmpi/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -61,6 +61,8 @@ if {[string first "-devel" $subport] > 0} {
</span> # As OpenMPI creates compiler wrappers, there are lots of
# variants for what compiler the user would like to wrap.
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Please update the mpi portgroup whenever clist is changed.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Sub-ports names and corresponding configure.compiler value
array set clist {
clang {clang}
</pre><pre style='margin:0'>
</pre>