From bb192ea1bae0928428487828d219de63c4a8c6a0 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Sun, 28 Feb 2016 16:27:54 -0800 Subject: [PATCH 1/2] examples: fix check for Fortran "use mpi" bindings The output from "ompi_info --parsable" for the Fortran "use mpi" bindings apparently has changed over time. It is now: "yes (full: ignore TKR)" or "yes (limited: overloading)" (including the quotes) So update the test in examples/Makefile to also look for the quote. (cherry picked from commit open-mpi/ompi@20fade1345620ba62ee875e277d82446938a3b38) --- examples/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index 601a7d61af..457c3b792b 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -10,7 +10,7 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2006-2007 Sun Microsystems, Inc. All rights reserved. -# Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011-2016 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. # Copyright (c) 2013 Mellanox Technologies, Inc. All rights reserved. # $COPYRIGHT$ @@ -90,7 +90,7 @@ mpi: @ if ompi_info --parsable | grep bindings:mpif.h:yes >/dev/null; then \ $(MAKE) hello_mpifh ring_mpifh; \ fi - @ if ompi_info --parsable | grep bindings:use_mpi:yes >/dev/null; then \ + @ if ompi_info --parsable | grep bindings:use_mpi:\"yes >/dev/null; then \ $(MAKE) hello_usempi ring_usempi; \ fi @ if ompi_info --parsable | grep bindings:use_mpi_f08:yes >/dev/null; then \ From a4b23c14ec26160cf9449311dac2bdf1952b95b6 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Sun, 28 Feb 2016 17:19:54 -0800 Subject: [PATCH 2/2] examples: update ompi_info bindings checks Use "-q" option to grep/egrep to suppress output (we only need the exit status). Also, use egrep for the "use mpi" check, because some versions of ompi_info say 'bindings:use_mpi:yes' and others say 'bindings:use_mpi:"yes' (i.e., with the double quote). This regexp will work with both versions. (cherry picked from commit open-mpi/ompi@677a31bc9f8de2f646e11d772f4a28a45b71e42a) --- examples/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index 457c3b792b..643113509f 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -84,19 +84,19 @@ all: hello_c ring_c connectivity_c # MPI examples mpi: - @ if ompi_info --parsable | grep bindings:cxx:yes >/dev/null; then \ + @ if ompi_info --parsable | grep -q bindings:cxx:yes >/dev/null; then \ $(MAKE) hello_cxx ring_cxx; \ fi - @ if ompi_info --parsable | grep bindings:mpif.h:yes >/dev/null; then \ + @ if ompi_info --parsable | grep -q bindings:mpif.h:yes >/dev/null; then \ $(MAKE) hello_mpifh ring_mpifh; \ fi - @ if ompi_info --parsable | grep bindings:use_mpi:\"yes >/dev/null; then \ + @ if ompi_info --parsable | egrep -q bindings:use_mpi:\"\?yes >/dev/null; then \ $(MAKE) hello_usempi ring_usempi; \ fi - @ if ompi_info --parsable | grep bindings:use_mpi_f08:yes >/dev/null; then \ + @ if ompi_info --parsable | grep -q bindings:use_mpi_f08:yes >/dev/null; then \ $(MAKE) hello_usempif08 ring_usempif08; \ fi - @ if ompi_info --parsable | grep bindings:java:yes >/dev/null; then \ + @ if ompi_info --parsable | grep -q bindings:java:yes >/dev/null; then \ $(MAKE) Hello.class Ring.class; \ fi