diff --git a/config/ompi_mca.m4 b/config/ompi_mca.m4 index 9262c0f3c5..e59e7c72b1 100644 --- a/config/ompi_mca.m4 +++ b/config/ompi_mca.m4 @@ -225,7 +225,7 @@ AC_DEFUN([OMPI_MCA],[ [# BWB: Until projects have seperate configure scripts # and can skip running all of ORTE, just avoid recursing # into orte sub directory if orte disabled - if test "mca_project" = "ompi" -a "$enable_mpi" != "no" || test "mca_project" = "opal" || test "mca_project" = "orte" -a "$with_orte" != "no" || test "mca_project" = "oshmem" -a "$enable_oshmem" != "no" || test "mca_project" = "orcm" -a "$enable_orcm" != "no" ; then + if test "mca_project" = "ompi" -a "$enable_mpi" != "no" || test "mca_project" = "opal" || test "mca_project" = "orte" || test "mca_project" = "oshmem" || test "mca_project" = "orcm"; then MCA_PROJECT_SUBDIRS="$MCA_PROJECT_SUBDIRS mca_project" fi MCA_CONFIGURE_PROJECT(mca_project)]) diff --git a/config/oshmem_configure_options.m4 b/config/oshmem_configure_options.m4 index 8771b444a6..79f314ab92 100644 --- a/config/oshmem_configure_options.m4 +++ b/config/oshmem_configure_options.m4 @@ -21,8 +21,10 @@ AC_SUBST(OSHMEM_LIBSHMEM_EXTRA_LDFLAGS) # Disable Open SHMEM? # AC_ARG_ENABLE([oshmem], - [AC_HELP_STRING([--disable-oshmem], - [Disable building the OpenSHMEM interface])]) + [AC_HELP_STRING([--enable-oshmem], + [Enable building the OpenSHMEM interface (disabled by default)])], + [enable_oshmem=yes], + [enable_oshmem=no]) # # Enable compatibility mode @@ -31,7 +33,7 @@ AC_MSG_CHECKING([if want SGI/Quadrix compatibility mode]) AC_ARG_ENABLE(oshmem-compat, AC_HELP_STRING([--enable-oshmem-compat], [enable compatibility mode (default: enabled)])) -if test "$enable_oshmem_compat" != "no"; then +if test "$enable_oshmem" != "no" -a "$enable_oshmem_compat" != "no"; then AC_MSG_RESULT([yes]) OSHMEM_SPEC_COMPAT=1 else @@ -49,22 +51,26 @@ AC_DEFINE_UNQUOTED([OSHMEM_SPEC_COMPAT], [$OSHMEM_SPEC_COMPAT], AC_MSG_CHECKING([if want OSHMEM API parameter checking]) AC_ARG_WITH(oshmem-param-check, AC_HELP_STRING([--oshmem-param-check(=VALUE)], - [behavior of OSHMEM API function parameter checking. Valid values are: always, never. If --with-oshmem-param-check is specified with no VALUE argument, it is equivalent to a VALUE of "always"; --without-oshmem-param-check is equivalent to "never" (default: never).])) -shmem_param_check=0 -if test "$with_oshmem_param_check" = "no" -o \ - "$with_oshmem_param_check" = "never" -o \ - -z "$with_oshmem_param_check"; then - shmem_param_check=0 - AC_MSG_RESULT([never]) -elif test "$with_oshmem_param_check" = "yes" -o \ - "$with_oshmem_param_check" = "always"; then - shmem_param_check=1 - AC_MSG_RESULT([always]) + [behavior of OSHMEM API function parameter checking. Valid values are: always, never. If --with-oshmem-param-check is specified with no VALUE argument, it is equivalent to a VALUE of "always"; --without-oshmem-param-check is equivalent to "never" (default: always).])) +if test "$enable_oshmem" != "no"; then + if test "$with_oshmem_param_check" = "no" -o \ + "$with_oshmem_param_check" = "never"; then + shmem_param_check=0 + AC_MSG_RESULT([never]) + elif test "$with_oshmem_param_check" = "yes" -o \ + "$with_oshmem_param_check" = "always" -o \ + -z "$with_oshmem_param_check"; then + shmem_param_check=1 + AC_MSG_RESULT([always]) + else + AC_MSG_RESULT([unknown]) + AC_MSG_WARN([*** Unrecognized --with-oshmem-param-check value]) + AC_MSG_WARN([*** See "configure --help" output]) + AC_MSG_WARN([*** Defaulting to "runtime"]) + fi else - AC_MSG_RESULT([unknown]) - AC_MSG_WARN([*** Unrecognized --with-oshmem-param-check value]) - AC_MSG_WARN([*** See "configure --help" output]) - AC_MSG_WARN([*** Defaulting to "runtime"]) + shmem_param_check=0 + AC_MSG_RESULT([no]) fi AC_DEFINE_UNQUOTED(OSHMEM_PARAM_CHECK, $shmem_param_check, [Whether we want to check OSHMEM parameters always or never]) @@ -77,7 +83,7 @@ AC_MSG_CHECKING([if want pshmem_]) AC_ARG_ENABLE(oshmem-profile, AC_HELP_STRING([--enable-oshmem-profile], [enable OSHMEM profiling (default: enabled)])) -if test "$enable_oshmem_profile" != "no"; then +if test "$enable_oshmem" != "no" -a "$enable_oshmem_profile" != "no"; then AC_MSG_RESULT([yes]) oshmem_profiling_support=1 else @@ -93,9 +99,9 @@ AC_MSG_CHECKING([if want to build OSHMEM fortran bindings]) AC_ARG_ENABLE(oshmem-fortran, AC_HELP_STRING([--enable-oshmem-fortran], [enable OSHMEM Fortran bindings (default: enabled if Fortran compiler found)])) -if test "$enable_oshmem_fortran" != "no"; then +if test "$enable_oshmem" != "no" -a "$enable_oshmem_fortran" != "no"; then # If no OMPI FORTRAN, bail - AS_IF([test $OMPI_WANT_FORTRAN_BINDINGS -eq 0 -a "$enable_oshmem" != "no" -a "$enable_oshmem_fortran" == "yes"], + AS_IF([test $OMPI_WANT_FORTRAN_BINDINGS -eq 0 -a "$enable_oshmem_fortran" == "yes"], [AC_MSG_RESULT([bad value OMPI_WANT_FORTRAN_BINDINGS: ($OMPI_WANT_FORTRAN_BINDINGS)]) AC_MSG_WARN([Your request to --enable-oshmem-fortran can only be satisfied if fortran support is enabled in OMPI. You see this message because OMPI fortran support has been explicitly disabled via --disable-mpi-fortran and OSHMEM fortran support was explicitly enabled with --enable-oshmem-fortran. @@ -107,6 +113,7 @@ Configure will abort because you, a human, have asked for something that cannot AC_MSG_RESULT([no]) fi else + enable_oshmem_fortran=no AC_MSG_RESULT([no]) fi diff --git a/configure.ac b/configure.ac index 2969f76965..5231e1cdf7 100644 --- a/configure.ac +++ b/configure.ac @@ -603,7 +603,7 @@ OPAL_CONFIG_ASM m4_ifdef([project_ompi], [OMPI_SETUP_MPI_FORTRAN], [ompi_fortran_happy=0]) AM_CONDITIONAL(OSHMEM_BUILD_FORTRAN_BINDINGS, - [test "$ompi_fortran_happy" == "1" -a \ + [test "$enable_oshmem" == "yes" -a "$ompi_fortran_happy" == "1" -a \ "$OMPI_WANT_FORTRAN_BINDINGS" == "1" -a \ "$enable_oshmem_fortran" != "no"]) diff --git a/ompi/communicator/communicator.h b/ompi/communicator/communicator.h index 76ee83ee52..ac292ff70f 100644 --- a/ompi/communicator/communicator.h +++ b/ompi/communicator/communicator.h @@ -17,6 +17,7 @@ * Copyright (c) 2011-2013 Universite Bordeaux 1 * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2014 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -36,6 +37,7 @@ #include "mpi.h" #include "ompi/group/group.h" #include "ompi/mca/coll/coll.h" +#include "ompi/info/info.h" #include "ompi/proc/proc.h" BEGIN_C_DECLS diff --git a/ompi/mca/rte/pmi/rte_pmi.h b/ompi/mca/rte/pmi/rte_pmi.h index 49a23041a4..e2d9c01f07 100644 --- a/ompi/mca/rte/pmi/rte_pmi.h +++ b/ompi/mca/rte/pmi/rte_pmi.h @@ -2,6 +2,7 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2013 Sandia National Laboratories. All rights reserved. + * Copyright (c) 2014 Intel, Inc. All rights reserved * * $COPYRIGHT$ * @@ -17,6 +18,8 @@ #include "opal/dss/dss_types.h" #include "opal/class/opal_pointer_array.h" +struct ompi_proc_t; + BEGIN_C_DECLS /* Process name objects and operations */ @@ -126,11 +129,11 @@ OMPI_DECLSPEC int ompi_rte_db_store(const ompi_process_name_t *proc, const char *key, const void *data, opal_data_type_t type); -OMPI_DECLSPEC int ompi_rte_db_fetch(const ompi_process_name_t *proc, +OMPI_DECLSPEC int ompi_rte_db_fetch(const struct ompi_proc_t *proc, const char *key, void **data, opal_data_type_t type); -OMPI_DECLSPEC int ompi_rte_db_fetch_pointer(const ompi_process_name_t *proc, +OMPI_DECLSPEC int ompi_rte_db_fetch_pointer(const struct ompi_proc_t *proc, const char *key, void **data, opal_data_type_t type); @@ -138,24 +141,19 @@ OMPI_DECLSPEC int ompi_rte_db_fetch_pointer(const ompi_process_name_t *proc, #define OMPI_DB_LOCALITY "ompi.locality" /* Communications */ + typedef int ompi_rml_tag_t; -OMPI_DECLSPEC int ompi_rte_send_buffer(const ompi_process_name_t *peer, - struct opal_buffer_t *buffer, - ompi_rml_tag_t tag, - int flags); +OMPI_DECLSPEC void ompi_rte_send_cbfunc(int, ompi_process_name_t*, + opal_buffer_t*, ompi_rml_tag_t, + void*); OMPI_DECLSPEC int ompi_rte_send_buffer_nb(const ompi_process_name_t *peer, struct opal_buffer_t *buffer, ompi_rml_tag_t tag, - int flags, void (*cbfunc)(int, ompi_process_name_t*, opal_buffer_t*, ompi_rml_tag_t, void*), void *cbdata); -OMPI_DECLSPEC int ompi_rte_recv_buffer(const ompi_process_name_t *peer, - struct opal_buffer_t *buf, - ompi_rml_tag_t tag, - int flags); OMPI_DECLSPEC int ompi_rte_recv_buffer_nb(const ompi_process_name_t *peer, ompi_rml_tag_t tag, int flags, @@ -175,11 +173,15 @@ OMPI_DECLSPEC int ompi_rte_parse_uris(const char* contact_info, /* define a starting point to avoid conflicts */ #define OMPI_RML_TAG_BASE 0 -#define OMPI_RML_PERSISTENT 0 +#define OMPI_RML_PERSISTENT true +#define OMPI_RML_NON_PERSISTENT false /* BWB: FIX ME: THis is not the right way to do this... */ #define ORTE_ERR_NO_MATCH_YET OMPI_ERROR +#define OMPI_RTE_NODE_ID "rte.nodeid" +#define OMPI_RTE_MY_NODEID 0 + END_C_DECLS #endif /* MCA_OMPI_RTE_PMI_H */ diff --git a/ompi/mca/rte/pmi/rte_pmi_comm.c b/ompi/mca/rte/pmi/rte_pmi_comm.c index 018d1ac33e..3aeaf3d91e 100644 --- a/ompi/mca/rte/pmi/rte_pmi_comm.c +++ b/ompi/mca/rte/pmi/rte_pmi_comm.c @@ -18,22 +18,16 @@ #include "rte_pmi.h" #include "rte_pmi_internal.h" - -int -ompi_rte_send_buffer(const ompi_process_name_t *peer, - struct opal_buffer_t *buffer, - ompi_rml_tag_t tag, - int flags) +void ompi_rte_send_cbfunc(int status, ompi_process_name_t* sender, + opal_buffer_t* buf, ompi_rml_tag_t tag, + void* cbdata) { - return OMPI_ERR_NOT_SUPPORTED; } - int ompi_rte_send_buffer_nb(const ompi_process_name_t *peer, struct opal_buffer_t *buffer, ompi_rml_tag_t tag, - int flags, void (*cbfunc)(int, ompi_process_name_t*, opal_buffer_t*, ompi_rml_tag_t, void*), @@ -43,16 +37,6 @@ ompi_rte_send_buffer_nb(const ompi_process_name_t *peer, } -int -ompi_rte_recv_buffer(const ompi_process_name_t *peer, - struct opal_buffer_t *buf, - ompi_rml_tag_t tag, - int flags) -{ - return OMPI_ERR_NOT_SUPPORTED; -} - - int ompi_rte_recv_buffer_nb(const ompi_process_name_t *peer, ompi_rml_tag_t tag, diff --git a/ompi/mca/rte/pmi/rte_pmi_db.c b/ompi/mca/rte/pmi/rte_pmi_db.c index cda8b2eb06..f181438345 100644 --- a/ompi/mca/rte/pmi/rte_pmi_db.c +++ b/ompi/mca/rte/pmi/rte_pmi_db.c @@ -26,6 +26,7 @@ #include "ompi/constants.h" #include "ompi/mca/rte/rte.h" #include "ompi/mca/rte/base/base.h" +#include "ompi/proc/proc.h" #include "rte_pmi.h" #include "rte_pmi_internal.h" @@ -527,7 +528,7 @@ ompi_rte_db_store(const ompi_process_name_t *proc, int -ompi_rte_db_fetch(const ompi_process_name_t *proc, +ompi_rte_db_fetch(const struct ompi_proc_t *pptr, const char *key, void **data, opal_data_type_t type) @@ -542,7 +543,9 @@ ompi_rte_db_fetch(const ompi_process_name_t *proc, char tmp_val[1024]; opal_hwloc_locality_t locality; size_t sval; + ompi_process_name_t *proc; + proc = &((ompi_proc_t*)pptr)->proc_name; opal_output_verbose(5, ompi_rte_base_framework.framework_output, "%s db:pmi:fetch: searching for key %s[%s] on proc %s", OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), @@ -674,13 +677,15 @@ ompi_rte_db_fetch(const ompi_process_name_t *proc, int -ompi_rte_db_fetch_pointer(const ompi_process_name_t *proc, +ompi_rte_db_fetch_pointer(const struct ompi_proc_t *pptr, const char *key, void **data, opal_data_type_t type) { local_data_t *pdat; + ompi_process_name_t *proc; + proc = &((ompi_proc_t*)pptr)->proc_name; opal_output_verbose(5, ompi_rte_base_framework.framework_output, "%s db:pmi:fetch_pointer: searching for key %s on proc %s", OMPI_NAME_PRINT(OMPI_PROC_MY_NAME), diff --git a/ompi/proc/proc.c b/ompi/proc/proc.c index abf770ce4c..8bfc82925e 100644 --- a/ompi/proc/proc.c +++ b/ompi/proc/proc.c @@ -12,7 +12,7 @@ * Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2013 Intel, Inc. All rights reserved + * Copyright (c) 2013-2014 Intel, Inc. All rights reserved * $COPYRIGHT$ * * Additional copyrights may follow @@ -32,6 +32,7 @@ #include "opal/util/arch.h" #include "opal/util/show_help.h" #include "opal/mca/db/db.h" +#include "opal/mca/hwloc/base/base.h" #include "ompi/proc/proc.h" #include "ompi/datatype/ompi_datatype.h" diff --git a/orte/Makefile.am b/orte/Makefile.am index 06e59353c5..5e0a44d5f2 100644 --- a/orte/Makefile.am +++ b/orte/Makefile.am @@ -10,6 +10,7 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -18,12 +19,22 @@ # SUBDIRS = \ - include \ + include + +if PROJECT_ORTE +SUBDIRS += \ $(MCA_orte_FRAMEWORKS_SUBDIRS) \ - $(MCA_orte_FRAMEWORK_COMPONENT_STATIC_SUBDIRS) \ + $(MCA_orte_FRAMEWORK_COMPONENT_STATIC_SUBDIRS) +endif + +SUBDIRS += \ etc \ - . \ + . + +if PROJECT_ORTE +SUBDIRS += \ $(MCA_orte_FRAMEWORK_COMPONENT_DSO_SUBDIRS) +endif DIST_SUBDIRS = \ include \ @@ -32,8 +43,11 @@ DIST_SUBDIRS = \ $(MCA_orte_FRAMEWORK_COMPONENT_ALL_SUBDIRS) # Build the main ORTE library +lib_LTLIBRARIES = +if PROJECT_ORTE +lib_LTLIBRARIES += libopen-rte.la +endif -lib_LTLIBRARIES = libopen-rte.la libopen_rte_la_SOURCES = libopen_rte_la_LIBADD = \ $(MCA_orte_FRAMEWORK_LIBS) \ diff --git a/orte/tools/Makefile.am b/orte/tools/Makefile.am index b302352eb1..fcbe10a712 100644 --- a/orte/tools/Makefile.am +++ b/orte/tools/Makefile.am @@ -13,7 +13,8 @@ # Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights # reserved. - # $COPYRIGHT$ +# Copyright (c) 2014 Intel, Inc. All rights reserved. +# $COPYRIGHT$ # # Additional copyrights may follow # @@ -23,6 +24,7 @@ # This makefile.am does not stand on its own - it is included from # orte/Makefile.am +if PROJECT_ORTE SUBDIRS += \ tools/orte-checkpoint \ tools/orte-clean \ @@ -35,6 +37,7 @@ SUBDIRS += \ tools/orte-info \ tools/orte-migrate \ tools/orte-server +endif DIST_SUBDIRS += \ tools/orte-checkpoint \ diff --git a/orte/tools/wrappers/Makefile.am b/orte/tools/wrappers/Makefile.am index ed01690b17..148e909751 100644 --- a/orte/tools/wrappers/Makefile.am +++ b/orte/tools/wrappers/Makefile.am @@ -26,12 +26,14 @@ nodist_ompidata_DATA = ortecc-wrapper-data.txt pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = orte.pc +if PROJECT_ORTE install-exec-hook: test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" (cd $(DESTDIR)$(bindir); rm -f ortecc$(EXEEXT); $(LN_S) opal_wrapper ortecc) uninstall-local: rm -f $(DESTDIR)$(bindir)/ortecc$(EXEEXT) +endif endif # OMPI_INSTALL_BINARIES diff --git a/oshmem/Makefile.am b/oshmem/Makefile.am index 199e7c302a..b824ec5ed8 100644 --- a/oshmem/Makefile.am +++ b/oshmem/Makefile.am @@ -1,7 +1,8 @@ # # Copyright (c) 2013 Mellanox Technologies, Inc. # All rights reserved. -# Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -26,13 +27,23 @@ endif SUBDIRS = \ include \ shmem/c \ - shmem/fortran \ + shmem/fortran + +if PROJECT_OSHMEM +SUBDIRS += \ $(EXT_oshmem_FRAMEWORKS_SUBDIRS) \ $(EXT_oshmem_FRAMEWORK_COMPONENT_STATIC_SUBDIRS) \ $(MCA_oshmem_FRAMEWORKS_SUBDIRS) \ - $(MCA_oshmem_FRAMEWORK_COMPONENT_STATIC_SUBDIRS) \ - . \ + $(MCA_oshmem_FRAMEWORK_COMPONENT_STATIC_SUBDIRS) +endif + +SUBDIRS += \ + . + +if PROJECT_OSHMEM +SUBDIRS += \ $(MCA_oshmem_FRAMEWORK_COMPONENT_DSO_SUBDIRS) +endif DIST_SUBDIRS = \ include \ @@ -44,7 +55,11 @@ DIST_SUBDIRS = \ $(MCA_oshmem_FRAMEWORK_COMPONENT_ALL_SUBDIRS) #Build The main OSHMEM library -lib_LTLIBRARIES = liboshmem.la +lib_LTLIBRARIES = +if PROJECT_OSHMEM +lib_LTLIBRARIES += liboshmem.la +endif + liboshmem_la_SOURCES = liboshmem_la_LIBADD = \ shmem/c/liboshmem_c.la \ diff --git a/oshmem/tools/Makefile.am b/oshmem/tools/Makefile.am index e86d8a8551..4004674053 100644 --- a/oshmem/tools/Makefile.am +++ b/oshmem/tools/Makefile.am @@ -1,6 +1,7 @@ # # Copyright (c) 2013 Mellanox Technologies, Inc. # All rights reserved. +# Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -10,10 +11,11 @@ # This makefile.am does not stand on its own - it is included from oshmem/Makefile.am - +if PROJECT_OSHMEM SUBDIRS += \ tools/oshmem_info \ tools/wrappers +endif DIST_SUBDIRS += \ tools/oshmem_info \ diff --git a/oshmem/tools/wrappers/Makefile.am b/oshmem/tools/wrappers/Makefile.am index 5f29f23247..ad802c0ba4 100644 --- a/oshmem/tools/wrappers/Makefile.am +++ b/oshmem/tools/wrappers/Makefile.am @@ -1,6 +1,7 @@ # Copyright (c) 2013 Mellanox Technologies, Inc. # All rights reserved. -# Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2014 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -17,6 +18,7 @@ dist_ompidata_DATA = \ shmemcc-wrapper-data.txt \ shmemfort-wrapper-data.txt +if PROJECT_OSHMEM install-exec-hook: test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" (cd $(DESTDIR)$(bindir); rm -f shmemrun$(EXEEXT); $(LN_S) mpirun shmemrun) @@ -41,3 +43,4 @@ uninstall-local: $(DESTDIR)$(pkgdatadir)/oshcc-wrapper-data.txt \ $(DESTDIR)$(pkgdatadir)/shmemfort-wrapper-data.txt \ $(DESTDIR)$(pkgdatadir)/oshfort-wrapper-data.txt +endif