1
1

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.
Этот коммит содержится в:
Jeff Squyres 2016-02-28 17:19:54 -08:00
родитель 20fade1345
Коммит 677a31bc9f

Просмотреть файл

@ -84,19 +84,19 @@ all: hello_c ring_c connectivity_c
# MPI examples # MPI examples
mpi: 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; \ $(MAKE) hello_cxx ring_cxx; \
fi 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; \ $(MAKE) hello_mpifh ring_mpifh; \
fi 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; \ $(MAKE) hello_usempi ring_usempi; \
fi 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; \ $(MAKE) hello_usempif08 ring_usempif08; \
fi 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; \ $(MAKE) Hello.class Ring.class; \
fi fi