diff --git a/ompi/tools/wrappers/mpic++-wrapper-data.txt.in b/ompi/tools/wrappers/mpic++-wrapper-data.txt.in index 4138edccd1..a97f776e97 100644 --- a/ompi/tools/wrappers/mpic++-wrapper-data.txt.in +++ b/ompi/tools/wrappers/mpic++-wrapper-data.txt.in @@ -17,6 +17,10 @@ preprocessor_flags=@OMPI_WRAPPER_EXTRA_CPPFLAGS@ compiler_flags_prefix=@OMPI_WRAPPER_EXTRA_CXXFLAGS_PREFIX@ compiler_flags=@OMPI_WRAPPER_EXTRA_CXXFLAGS@ linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@ +# Note that per https://svn.open-mpi.org/trac/ompi/ticket/3422, we +# intentionally only link in the MPI libraries (ORTE, OPAL, etc. are +# pulled in implicitly) because we intend MPI applications to only use +# the MPI API. libs=@OMPI_WRAPPER_CXX_LIB@ -lmpi @OMPI_WRAPPER_EXTRA_LIBS@ libs_static=@OMPI_WRAPPER_CXX_LIB@ -lmpi @OMPI_WRAPPER_EXTRA_LIBS@ -lopen-rte @ORTE_WRAPPER_EXTRA_LIBS@ -lopen-pal @OPAL_WRAPPER_EXTRA_LIBS@ dyn_lib_file=libmpi.@OPAL_DYN_LIB_SUFFIX@ diff --git a/ompi/tools/wrappers/mpicc-wrapper-data.txt.in b/ompi/tools/wrappers/mpicc-wrapper-data.txt.in index a772485520..9961cfed71 100644 --- a/ompi/tools/wrappers/mpicc-wrapper-data.txt.in +++ b/ompi/tools/wrappers/mpicc-wrapper-data.txt.in @@ -17,6 +17,10 @@ preprocessor_flags=@OMPI_WRAPPER_EXTRA_CPPFLAGS@ compiler_flags_prefix=@OMPI_WRAPPER_EXTRA_CFLAGS_PREFIX@ compiler_flags=@OMPI_WRAPPER_EXTRA_CFLAGS@ linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@ +# Note that per https://svn.open-mpi.org/trac/ompi/ticket/3422, we +# intentionally only link in the MPI libraries (ORTE, OPAL, etc. are +# pulled in implicitly) because we intend MPI applications to only use +# the MPI API. libs=-lmpi @OMPI_WRAPPER_EXTRA_LIBS@ libs_static=-lmpi @OMPI_WRAPPER_EXTRA_LIBS@ -lopen-rte @ORTE_WRAPPER_EXTRA_LIBS@ -lopen-pal @OPAL_WRAPPER_EXTRA_LIBS@ dyn_lib_file=libmpi.@OPAL_DYN_LIB_SUFFIX@ diff --git a/ompi/tools/wrappers/mpifort-wrapper-data.txt.in b/ompi/tools/wrappers/mpifort-wrapper-data.txt.in index 42e0a2519a..ab8a60e412 100644 --- a/ompi/tools/wrappers/mpifort-wrapper-data.txt.in +++ b/ompi/tools/wrappers/mpifort-wrapper-data.txt.in @@ -17,6 +17,10 @@ extra_includes= preprocessor_flags= compiler_flags=@OMPI_WRAPPER_EXTRA_FCFLAGS@ linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@ +# Note that per https://svn.open-mpi.org/trac/ompi/ticket/3422, we +# intentionally only link in the MPI libraries (ORTE, OPAL, etc. are +# pulled in implicitly) because we intend MPI applications to only use +# the MPI API. libs=@OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -lmpi_mpifh -lmpi -lopen-rte -lopen-pal @OMPI_WRAPPER_EXTRA_LIBS@ libs_static=@OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -lmpi_mpifh -lmpi @OMPI_WRAPPER_EXTRA_LIBS@ -lopen-rte @ORTE_WRAPPER_EXTRA_LIBS@ -lopen-pal @OPAL_WRAPPER_EXTRA_LIBS@ dyn_lib_file=libmpi.@OPAL_DYN_LIB_SUFFIX@ diff --git a/ompi/tools/wrappers/ompi_wrapper_script.in b/ompi/tools/wrappers/ompi_wrapper_script.in index e603650b5a..d87649fbb9 100644 --- a/ompi/tools/wrappers/ompi_wrapper_script.in +++ b/ompi/tools/wrappers/ompi_wrapper_script.in @@ -55,7 +55,11 @@ my $preproc_flags = $include_flag . $includedir; my $comp_flags = ""; my $comp_flags_prefix = ""; my $linker_flags = $libdir_flag . $libdir . " " . $extra_ldflags; -my $libs = "-lmpi -lopen-rte -lopen-pal " . $extra_libs; +# Note that per https://svn.open-mpi.org/trac/ompi/ticket/3422, we +# intentionally only link in the MPI libraries (ORTE, OPAL, etc. are +# pulled in implicitly) because we intend MPI applications to only use +# the MPI API. +my $libs = "-lmpi " . $extra_libs; sub check_env { @@ -134,10 +138,12 @@ my @appargs = (); while (scalar(@args) > 0) { my $arg = shift(@args); - if ($arg eq "-showme") { + if ($arg eq "-showme" || $arg eq "--showme") { $dry_run = 1; } elsif ($arg eq "-lpmpi") { $want_pmpi = 1; + } elsif ($arg eq "--openmpi:linkall") { + $libs = "-lmpi -lopen-rte -lopen-pal" . $extra_libs; } else { if ($arg eq "-c") { $want_link = 0; diff --git a/orte/tools/wrappers/orte_wrapper_script.in b/orte/tools/wrappers/orte_wrapper_script.in index c5b0ba7ad9..7f9a46897f 100644 --- a/orte/tools/wrappers/orte_wrapper_script.in +++ b/orte/tools/wrappers/orte_wrapper_script.in @@ -4,7 +4,7 @@ # Note that we use an interpreter value ("PERL") from configure # because even "#!/usr/bin/env perl" to all systems (e.g., NetBSD). # -# Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. # $COPYRIGHT$ # @@ -120,8 +120,12 @@ my @appargs = (); while (scalar(@args) > 0) { my $arg = shift(@args); - if ($arg eq "-showme") { + if ($arg eq "-showme" || $arg eq "--showme") { $dry_run = 1; + } elsif ($arg eq "--openmpi:linkall") { + # Nothing to do -- the orte wrapper script already links both + # the ORTE and OPAL libs. + next; } else { if ($arg eq "-c") { $want_link = 0; diff --git a/orte/tools/wrappers/ortec++-wrapper-data.txt.in b/orte/tools/wrappers/ortec++-wrapper-data.txt.in index 5709862e89..5ca3805214 100644 --- a/orte/tools/wrappers/ortec++-wrapper-data.txt.in +++ b/orte/tools/wrappers/ortec++-wrapper-data.txt.in @@ -17,6 +17,10 @@ preprocessor_flags=@ORTE_WRAPPER_EXTRA_CPPFLAGS@ compiler_flags_prefix=@ORTE_WRAPPER_EXTRA_CXXFLAGS_PREFIX@ compiler_flags=@ORTE_WRAPPER_EXTRA_CXXFLAGS@ linker_flags=@ORTE_WRAPPER_EXTRA_LDFLAGS@ +# Note that per https://svn.open-mpi.org/trac/ompi/ticket/3422, we +# intentionally always link in open-pal and open-rte in +# ortecc/ortec++ because we intend ORTE applications to use both the +# ORTE and OPAL APIs. libs=-lopen-rte @ORTE_WRAPPER_EXTRA_LIBS@ -lopen-pal @OPAL_WRAPPER_EXTRA_LIBS@ libs_static=-lopen-rte @ORTE_WRAPPER_EXTRA_LIBS@ -lopen-pal @OPAL_WRAPPER_EXTRA_LIBS@ dyn_lib_file=libopen-rte.@OPAL_DYN_LIB_SUFFIX@ diff --git a/orte/tools/wrappers/ortecc-wrapper-data.txt.in b/orte/tools/wrappers/ortecc-wrapper-data.txt.in index a901f54d73..9d709fdb5e 100644 --- a/orte/tools/wrappers/ortecc-wrapper-data.txt.in +++ b/orte/tools/wrappers/ortecc-wrapper-data.txt.in @@ -17,6 +17,10 @@ preprocessor_flags=@ORTE_WRAPPER_EXTRA_CPPFLAGS@ compiler_flags_prefix=@ORTE_WRAPPER_EXTRA_CFLAGS_PREFIX@ compiler_flags=@ORTE_WRAPPER_EXTRA_CFLAGS@ linker_flags=@ORTE_WRAPPER_EXTRA_LDFLAGS@ +# Note that per https://svn.open-mpi.org/trac/ompi/ticket/3422, we +# intentionally always link in open-pal and open-rte in +# ortecc/ortec++ because we intend ORTE applications to use both the +# ORTE and OPAL APIs. libs=-lopen-rte @ORTE_WRAPPER_EXTRA_LIBS@ -lopen-pal @OPAL_WRAPPER_EXTRA_LIBS@ libs_static=-lopen-rte @ORTE_WRAPPER_EXTRA_LIBS@ -lopen-pal @OPAL_WRAPPER_EXTRA_LIBS@ dyn_lib_file=libopen-rte.@OPAL_DYN_LIB_SUFFIX@