More comments on this commit: - The Fortran, Java, and C++ MPI examples are now no longer build by default. Er... what happened there, and why?
- Why are the oshmem examples in a separate target? The point of the previous makefile was that "make" (or "make all") would build all relevant examples -- including oshmem examples (if possible). - Why are the oshmem examples still named/branded as "shmem" (and not oshmem)? On Nov 11, 2013, at 1:22 PM, Jeff Squyres (jsquyres) <jsquy...@cisco.com> wrote: > This commit produces warnings in the output of oshmem_info: > > OSHMEM Fort shmem.fh: yes > ************************************************************************** > *** DEVELOPER WARNING: A field in ompi_info output is too long and > *** will appear poorly in the prettyprint output. > *** > *** Value: "OSHMEM SGI/Quadrix compatibility mode" > *** Max length: 24 > ************************************************************************** > OSHMEM SGI/Quadrix compatibility mode: yes > ************************************************************************** > *** DEVELOPER WARNING: A field in ompi_info output is too long and > *** will appear poorly in the prettyprint output. > *** > *** Value: "OSHMEM API functions parameter checking" > *** Max length: 24 > ************************************************************************** > OSHMEM API functions parameter checking: yes > OSHMEM profiling support: yes > > > > On Nov 11, 2013, at 9:26 AM, svn-commit-mai...@open-mpi.org wrote: > >> Author: miked (Mike Dubman) >> Date: 2013-11-11 09:26:25 EST (Mon, 11 Nov 2013) >> New Revision: 29651 >> URL: https://svn.open-mpi.org/trac/ompi/changeset/29651 >> >> Log: >> Applying Jeff`s comments about proper SHMEM fortran organization of files. >> Refs: 3870 >> >> Added: >> trunk/examples/hello_shmemfh.f90 >> trunk/examples/ring_shmemfh.f90 >> Deleted: >> trunk/examples/hello_shmemfh.f >> trunk/examples/ring_shmem.f90 >> trunk/examples/ring_shmemfh.f >> Text files modified: >> trunk/config/oshmem_configure_options.m4 | 1 >> >> trunk/examples/Makefile | 31 ++++++++++------- >> >> trunk/examples/Makefile.include | 5 +- >> >> trunk/examples/README | 5 +- >> >> /dev/null | 19 ---------- >> >> trunk/examples/hello_shmemfh.f90 | 22 ++++++++++++ >> >> /dev/null | 64 >> ------------------------------------ >> /dev/null | 71 >> ---------------------------------------- >> trunk/examples/ring_shmemfh.f90 | 62 >> ++++++++++++++++++++++++++++++++++ >> trunk/oshmem/include/shmem.fh | 2 + >> >> trunk/oshmem/tools/oshmem_info/Makefile.am | 11 ++++++ >> >> trunk/oshmem/tools/oshmem_info/param.c | 18 +++++++++- >> >> 12 files changed, 135 insertions(+), 176 deletions(-) >> >> Modified: trunk/config/oshmem_configure_options.m4 >> ============================================================================== >> --- trunk/config/oshmem_configure_options.m4 Sat Nov 9 23:12:14 2013 >> (r29650) >> +++ trunk/config/oshmem_configure_options.m4 2013-11-11 09:26:25 EST (Mon, >> 11 Nov 2013) (r29651) >> @@ -112,7 +112,6 @@ >> [AC_MSG_RESULT([no])]) >> ]) >> >> - >> AC_DEFUN([OSHMEM_SETUP_CFLAGS],[ >> >> >> >> Modified: trunk/examples/Makefile >> ============================================================================== >> --- trunk/examples/Makefile Sat Nov 9 23:12:14 2013 (r29650) >> +++ trunk/examples/Makefile 2013-11-11 09:26:25 EST (Mon, 11 Nov 2013) >> (r29651) >> @@ -50,8 +50,8 @@ >> hello_mpifh \ >> hello_usempi \ >> hello_usempif08 \ >> - hello_shmem \ >> - hello_shmemfh \ >> + hello_shmem \ >> + hello_shmemfh \ >> Hello.class \ >> ring_c \ >> ring_cxx \ >> @@ -60,14 +60,16 @@ >> ring_usempif08 \ >> ring_shmem \ >> ring_shmemfh \ >> - ring_shmemf90 \ >> Ring.class \ >> connectivity_c >> >> -# Default target. Always build the C example. Only build the others >> -# if Open MPI was build with the relevant language bindings. >> - >> +# Default target. >> all: hello_c ring_c connectivity_c >> + >> +# Always build the C example. Only build the others >> +# if Open MPI was build with the relevant language bindings. >> +mpi: >> + >> @ if ompi_info --parsable | grep bindings:cxx:yes >/dev/null; then \ >> $(MAKE) hello_cxx ring_cxx; \ >> fi >> @@ -83,12 +85,17 @@ >> @ if ompi_info --parsable | grep bindings:java:yes >/dev/null; then \ >> $(MAKE) Hello.class Ring.class; \ >> fi >> - @ if ompi_info --parsable | grep mca:shmem >/dev/null; then \ >> + >> +# Only build if we built OSHMEM support. >> +# Only build the Fortran examples if we have Fortran OSHMEM support. >> +shmem: >> + @ if oshmem_info --parsable | grep oshmem:bindings:c >/dev/null; then \ >> $(MAKE) hello_shmem; \ >> - $(MAKE) hello_shmemfh; \ >> $(MAKE) ring_shmem; \ >> + fi >> + @ if oshmem_info --parsable | grep oshmem:bindings:fort >/dev/null; >> then \ >> + $(MAKE) hello_shmemfh; \ >> $(MAKE) ring_shmemfh; \ >> - $(MAKE) ring_shmemf90; \ >> fi >> >> # The usual "clean" target >> @@ -120,13 +127,11 @@ >> >> hello_shmem: hello_shmem_c.c >> $(SHMEMCC) $(CFLAGS) $^ -o $@ >> -hello_shmemfh: hello_shmemfh.f >> +hello_shmemfh: hello_shmemfh.f90 >> $(SHMEMFC) $(FCFLAGS) $^ -o $@ >> >> ring_shmem: ring_shmem_c.c >> $(SHMEMCC) $(CFLAGS) $^ -o $@ >> -ring_shmemfh: ring_shmemfh.f >> - $(SHMEMFC) $(FCFLAGS) $^ -o $@ >> -ring_shmemf90: ring_shmem.f90 >> +ring_shmemfh: ring_shmemfh.f90 >> $(SHMEMFC) $(FCFLAGS) $^ -o $@ >> >> >> Modified: trunk/examples/Makefile.include >> ============================================================================== >> --- trunk/examples/Makefile.include Sat Nov 9 23:12:14 2013 (r29650) >> +++ trunk/examples/Makefile.include 2013-11-11 09:26:25 EST (Mon, 11 Nov >> 2013) (r29651) >> @@ -39,15 +39,14 @@ >> examples/hello_usempi.f90 \ >> examples/hello_usempif08.f90 \ >> examples/hello_shmem_c.c \ >> - examples/hello_shmemfh.f \ >> + examples/hello_shmemfh.f90 \ >> examples/ring_c.c \ >> examples/ring_cxx.cc \ >> examples/ring_mpifh.f \ >> examples/ring_usempi.f90 \ >> examples/ring_usempif08.f90 \ >> examples/ring_shmem_c.c \ >> - examples/ring_shmemfh.f \ >> - examples/ring_shmem.f90 \ >> + examples/ring_shmemfh.f90 \ >> examples/connectivity_c.c \ >> examples/Hello.java \ >> examples/Ring.java >> >> Modified: trunk/examples/README >> ============================================================================== >> --- trunk/examples/README Sat Nov 9 23:12:14 2013 (r29650) >> +++ trunk/examples/README 2013-11-11 09:26:25 EST (Mon, 11 Nov 2013) >> (r29651) >> @@ -31,7 +31,7 @@ >> Fortran use mpi_f08: hello_usempif08.f90 >> Java: Hello.java >> C shmem.h: hello_shmem_c.c >> - Fortran shmemfh.f: hello_shmemfh.f >> + Fortran shmem.fh: hello_shmemfh.f90 >> >> - Send a trivial message around in a ring >> C: ring_c.c >> @@ -41,8 +41,7 @@ >> Fortran use mpi_f08: ring_usempif08.f90 >> Java: Ring.java >> C shmem.h: ring_shmem_c.c >> - Fortran shmemfh.f: ring_shmemfh.f >> - F90 shmemfh.f: ring_shmem.f90 >> + Fortran shmem.fh: ring_shmemfh.f90 >> >> Additionally, there's one further example application, but this one >> only uses the MPI C bindings: >> >> Deleted: trunk/examples/hello_shmemfh.f >> ============================================================================== >> --- trunk/examples/hello_shmemfh.f 2013-11-11 09:26:25 EST (Mon, 11 Nov >> 2013) (r29650) >> +++ /dev/null 00:00:00 1970 (deleted) >> @@ -1,19 +0,0 @@ >> -C * >> -C * Copyright (c) 2013 Mellanox Technologies, Inc. >> -C * All rights reserved. >> -C * $COPYRIGHT$ >> -C * >> -C * Additional copyrights may follow >> -C * >> -C * $HEADER$ >> -C * >> - >> - program main >> - integer proc, nproc >> - call START_PES(0) >> - proc = MY_PE() >> - nproc = NUM_PES() >> - >> - write(*, '("Hello, world, I am ", i2, " of ", i2)') >> - & proc, nproc >> - end >> >> Added: trunk/examples/hello_shmemfh.f90 >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ trunk/examples/hello_shmemfh.f90 2013-11-11 09:26:25 EST (Mon, 11 Nov >> 2013) (r29651) >> @@ -0,0 +1,22 @@ >> +! >> +! Copyright (c) 2013 Mellanox Technologies, Inc. >> +! All rights reserved. >> +! $COPYRIGHT$ >> +! >> +! Additional copyrights may follow >> +! >> +! $HEADER$ >> +! >> +program hello_shmem >> + implicit none >> + include 'shmem.fh' >> + >> + integer proc, nproc >> + >> + call START_PES(0) >> + proc = MY_PE() >> + nproc = NUM_PES() >> + >> + write(*, '("Hello, world, I am ", i2, " of ", i2)') proc, nproc >> +end program hello_shmem >> + >> >> Deleted: trunk/examples/ring_shmem.f90 >> ============================================================================== >> --- trunk/examples/ring_shmem.f90 2013-11-11 09:26:25 EST (Mon, 11 Nov >> 2013) (r29650) >> +++ /dev/null 00:00:00 1970 (deleted) >> @@ -1,64 +0,0 @@ >> -! >> -! Copyright (c) 2013 Mellanox Technologies, Inc. >> -! All rights reserved. >> -! $COPYRIGHT$ >> -! >> -! Additional copyrights may follow >> -! >> -! $HEADER$ >> -! >> - >> -program ring_shmem_f90 >> - implicit none >> - include 'shmem.fh' >> - >> - integer*8, save :: rbuf >> - integer*8 :: message >> - integer :: proc, nproc, next >> -! func definitions >> - integer :: my_pe, num_pes >> - >> - rbuf = -1 >> - message = 10 >> - >> - call start_pes(0) >> - proc = my_pe() >> - nproc = num_pes() >> - >> -! Calculate the PE number of the next process in the ring. Use the >> -! modulus operator so that the last process "wraps around" to PE 0. >> - >> - next = mod((proc + 1), nproc) >> - >> - if (proc == 0) then >> - write(*, '("Process 0 sending ", i2, " to", i2, " (", i2, " >> processes in ring)")') message, next, nproc >> - call shmem_put8(rbuf, message, 1, next) >> - write(*, '("Process 0 sent to ", i2)') next >> - end if >> - >> -! Pass the message around the ring. The exit mechanism works as >> -! follows: the message (a positive integer) is passed around the >> -! ring. Each time it passes PE 0, it is decremented. When each >> -! processes receives a message containing a 0 value, it passes the >> -! message on to the next process and then quits. By passing the 0 >> -! message first, every process gets the 0 message and can quit >> -! normally. >> - >> - do while(message > 0) >> - call shmem_int8_wait_until(rbuf, SHMEM_CMP_EQ, message) >> - >> - if (proc == 0) then >> - message = message - 1 >> - write(*, '("Process 0 decremented value:", i2)') message >> - else >> - message = rbuf >> - end if >> - >> - call shmem_put8(rbuf, message, 1, next) >> - end do >> - >> -! All done >> - >> - write(*, '("Process", i2," exiting.")') proc >> - >> -end program >> >> Deleted: trunk/examples/ring_shmemfh.f >> ============================================================================== >> --- trunk/examples/ring_shmemfh.f 2013-11-11 09:26:25 EST (Mon, 11 Nov >> 2013) (r29650) >> +++ /dev/null 00:00:00 1970 (deleted) >> @@ -1,71 +0,0 @@ >> -C >> -C Copyright (c) 2013 Mellanox Technologies, Inc. >> -C All rights reserved. >> -C $COPYRIGHT$ >> -C >> -C Additional copyrights may follow >> -C >> -C $HEADER$ >> -C >> - >> - program ring_shmem_f77 >> - implicit none >> - include 'shmem.fh' >> - >> - integer*8 rbuf >> - save rbuf >> - integer*8 message >> - integer proc, nproc, next >> -C func definitions >> - integer my_pe, num_pes >> - >> - rbuf = -1 >> - message = 10 >> - >> - call start_pes(0) >> - proc = my_pe() >> - nproc = num_pes() >> - >> -C Calculate the PE number of the next process in the ring. Use the >> -C modulus operator so that the last process "wraps around" to PE 0. >> - >> - next = mod((proc + 1), nproc) >> - >> - if (proc .eq. 0) then >> - write(*, '("Process 0 sending ", i2, " to ", i2, >> - & " (", i2, " processes in ring)")') >> - & message, next, nproc >> - call shmem_put8(rbuf, message, 1, next) >> - write(*, '("Process 0 sent to ", i2)') next >> - end if >> - >> -C Pass the message around the ring. The exit mechanism works as >> -C follows: the message (a positive integer) is passed around the >> -C ring. Each time it passes PE 0, it is decremented. When each >> -C processes receives a message containing a 0 value, it passes the >> -C message on to the next process and then quits. By passing the 0 >> -C message first, every process gets the 0 message and can quit >> -C normally. >> - >> - 10 call shmem_int8_wait_until(rbuf, SHMEM_CMP_EQ, message) >> - >> - if (proc .eq. 0) then >> - message = message - 1 >> - write(*, '("Process 0 decremented value:", i2)') message >> - else >> - message = rbuf >> - end if >> - >> - call shmem_put8(rbuf, message, 1, next) >> - >> - if (message .gt. 0) then >> - goto 10 >> - else >> - goto 20 >> - end if >> - >> -C All done >> - >> - 20 write(*, '("Process", i2," exiting.")') proc >> - >> - end >> >> Added: trunk/examples/ring_shmemfh.f90 >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ trunk/examples/ring_shmemfh.f90 2013-11-11 09:26:25 EST (Mon, 11 Nov >> 2013) (r29651) >> @@ -0,0 +1,62 @@ >> +! >> +! Copyright (c) 2013 Mellanox Technologies, Inc. >> +! All rights reserved. >> +! $COPYRIGHT$ >> +! >> +! Additional copyrights may follow >> +! >> +! $HEADER$ >> +! >> + >> +program ring_shmem >> + implicit none >> + include 'shmem.fh' >> + >> + integer*8, save :: rbuf >> + integer*8 :: message >> + integer :: proc, nproc, next >> + >> + rbuf = -1 >> + message = 10 >> + >> + call start_pes(0) >> + proc = my_pe() >> + nproc = num_pes() >> + >> +! Calculate the PE number of the next process in the ring. Use the >> +! modulus operator so that the last process "wraps around" to PE 0. >> + >> + next = mod((proc + 1), nproc) >> + >> + if (proc == 0) then >> + write(*, '("Process 0 sending ", i2, " to", i2, " (", i2, " >> processes in ring)")') message, next, nproc >> + call shmem_put8(rbuf, message, 1, next) >> + write(*, '("Process 0 sent to ", i2)') next >> + end if >> + >> +! Pass the message around the ring. The exit mechanism works as >> +! follows: the message (a positive integer) is passed around the >> +! ring. Each time it passes PE 0, it is decremented. When each >> +! processes receives a message containing a 0 value, it passes the >> +! message on to the next process and then quits. By passing the 0 >> +! message first, every process gets the 0 message and can quit >> +! normally. >> + >> + do while(message > 0) >> + call shmem_int8_wait_until(rbuf, SHMEM_CMP_EQ, message) >> + >> + if (proc == 0) then >> + message = message - 1 >> + write(*, '("Process 0 decremented value:", i2)') message >> + else >> + message = rbuf >> + end if >> + >> + call shmem_put8(rbuf, message, 1, next) >> + end do >> + >> +! All done >> + >> + write(*, '("Process", i2," exiting.")') proc >> + >> +end program >> >> Modified: trunk/oshmem/include/shmem.fh >> ============================================================================== >> --- trunk/oshmem/include/shmem.fh Sat Nov 9 23:12:14 2013 (r29650) >> +++ trunk/oshmem/include/shmem.fh 2013-11-11 09:26:25 EST (Mon, 11 Nov >> 2013) (r29651) >> @@ -48,6 +48,8 @@ >> integer SHMEM_CMP_GE >> parameter ( SHMEM_CMP_GE = 5 ) >> >> + integer my_pe >> + integer num_pes >> >> logical shmem_pe_accessible >> logical shmem_addr_accessible >> >> Modified: trunk/oshmem/tools/oshmem_info/Makefile.am >> ============================================================================== >> --- trunk/oshmem/tools/oshmem_info/Makefile.am Sat Nov 9 23:12:14 >> 2013 (r29650) >> +++ trunk/oshmem/tools/oshmem_info/Makefile.am 2013-11-11 09:26:25 EST >> (Mon, 11 Nov 2013) (r29651) >> @@ -25,6 +25,17 @@ >> -DOMPI_BUILD_LIBS="\"@LIBS@\"" \ >> -DOPAL_CC_ABSOLUTE="\"@OPAL_CC_ABSOLUTE@\"" \ >> -DOMPI_CXX_ABSOLUTE="\"@OMPI_CXX_ABSOLUTE@\"" >> +if OSHMEM_PROFILING >> + AM_CFLAGS += -DOSHMEM_PROFILING=1 >> +else >> + AM_CFLAGS += -DOSHMEM_PROFILING=0 >> +endif >> + >> +if OSHMEM_WANT_FORTRAN_BINDINGS >> + AM_CFLAGS += -DOSHMEM_WANT_FORTRAN_BINDINGS=1 >> +else >> + AM_CFLAGS += -DOSHMEM_WANT_FORTRAN_BINDINGS=0 >> +endif >> >> include $(top_srcdir)/Makefile.man-page-rules >> >> >> Modified: trunk/oshmem/tools/oshmem_info/param.c >> ============================================================================== >> --- trunk/oshmem/tools/oshmem_info/param.c Sat Nov 9 23:12:14 2013 >> (r29650) >> +++ trunk/oshmem/tools/oshmem_info/param.c 2013-11-11 09:26:25 EST (Mon, >> 11 Nov 2013) (r29651) >> @@ -116,7 +116,7 @@ >> char *crdebug_support; >> char *topology_support; >> char *vt_support; >> - >> + >> /* Do a little preprocessor trickery here to figure opal_info_out the >> * tri-state of MPI_PARAM_CHECK (which will be either 0, 1, or >> * ompi_mpi_param_check). The preprocessor will only allow >> @@ -602,5 +602,19 @@ >> opal_info_out("MPI_MAX_DATAREP_STRING", "options:mpi-max-datarep-string", >> "IO interface not provided"); >> #endif >> - >> + >> + /* This block displays all the options with which the current >> + * installation of oshmem was configured. */ >> + { >> + char *oshmem_fortran = OSHMEM_WANT_FORTRAN_BINDINGS ? "yes" : "no"; >> + char *oshmem_compat = OSHMEM_SPEC_COMPAT ? "yes" : "no"; >> + char *oshmem_param_check = OSHMEM_PARAM_CHECK ? "yes" : "no"; >> + char *oshmem_profiling = OSHMEM_PROFILING ? "yes" : "no"; >> + >> + opal_info_out("OSHMEM C bindings", "oshmem:bindings:c", "yes"); >> + opal_info_out("OSHMEM Fort shmem.fh", "oshmem:bindings:fort", >> oshmem_fortran); >> + opal_info_out("OSHMEM SGI/Quadrix compatibility mode", >> "oshmem:options:spec_compat", oshmem_compat); >> + opal_info_out("OSHMEM API functions parameter checking", >> "oshmem:options:param_check", oshmem_param_check); >> + opal_info_out("OSHMEM profiling support", >> "oshmem:options:profiling", oshmem_profiling); >> + } >> } >> _______________________________________________ >> svn-full mailing list >> svn-f...@open-mpi.org >> http://www.open-mpi.org/mailman/listinfo.cgi/svn-full > > > -- > Jeff Squyres > jsquy...@cisco.com > For corporate legal information go to: > http://www.cisco.com/web/about/doing_business/legal/cri/ > > _______________________________________________ > devel mailing list > de...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/devel -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/