Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need ability to not use --enable-new-dtags option in linker scripts. #1089

Closed
hppritcha opened this issue Nov 2, 2015 · 15 comments · Fixed by #3506
Closed

need ability to not use --enable-new-dtags option in linker scripts. #1089

hppritcha opened this issue Nov 2, 2015 · 15 comments · Fixed by #3506

Comments

@hppritcha
Copy link
Member

It turns out the --enable-new-dtags linker option in the Open MPI compiler scripts is causing issues for some users:

Here's what a sysadmin reported:

Many of our users want to encode an RPATH to the MPI library in their executable at link time. In fact, they like to encode paths to all of their other libraries this way. On Linux, RPATH overrides anything a user sets in LD_LIBRARY_PATH, which provides one way for our app developers to ensure that thier users are getting the correct set of libraries (they can't mess things up with a wrong LD_LIBRARY_PATH setting). The --enable-new-dtags flag changes things so that LD_LIBRARY_PATH settings now override any RPATH setting, which breaks our apps.

MVAPICH recently added the --enable-new-dtags flag to their wrappers starting with MV2-2.1, which broke many of our applications. At that point, I also looked into Open MPI and found that this option was added somewhere by the time 1.8.3 was released. Apparently, this particular set of users wasn't using Open MPI, and so we didn't notice the change in Open MPI until now.

I asked MVAPICH to add a configure flag to avoid the --enable-new-dtags option. I now configure MV2-2.1 to drop this flag in the wrappers. I was looking to see if there's a similar fix already in Open MPI that we could use, and if not, if something could be added.
-Adam

@adammoody

@jsquyres
Copy link
Member

jsquyres commented Nov 3, 2015

@adammoody Does --disable-wrapper-rpath not work for you?

@dshrader
Copy link

@jsquyres I worked with @adammoody and @hppritcha on this and am following up on it now.

Using --disable-wrapper-rpath does solve the issue in that --enable-new-dtags is no longer present in the /share/openmpi/share/openmpi/*-wrapper-data.txt files. However, this solution is undesirable as it also removes the ability for the compiler wrappers to rpath. What we're hoping to have is the ability to isolate the --enable-new-dtags link option, which is about how rpathing is implemented, from the ability of the compiler wrappers to rpath in the first place.

Removing all references of --enable-new-dtags in the /share/openmpi/share/openmpi/*-wrapper-data.txt files solves the issue in that rpathing is still possible and --enable-new-dtags is no longer used when linking, but that has to be done after make install. It would be nice to be able to specify this at Open MPI's build time.

I also wonder why --enable-new-dtags is on by default as it takes away choice from users. Having it on by default leaves Open MPI users with no method of turning it off (depending on write access); having it off by default leaves it up to the user to have it on or off.

@payerle
Copy link

payerle commented May 10, 2016

Please allow an option to disable adding the --enable-new-dtags flag.
We are running into issues with it for openmpi/1.10.2 built with intel/2016.3.210 compiler suite; the
compiler environmental setup scripts sets LD_LIBRARY_PATH to include the path to Intel MPI libraries,
which are being preferred to the OpenMPI libraries set in rpath (because if DT_RUNPATH is set, DT_RPATH is ignored, so LD_LIBRARY_PATH takes precedence over both).

I can hack the configure scripts, etc. to mimic an loader which does not support --enable-new-dtags,
but it would be nice to have a configure option. Please add an option to disable this.

jsquyres pushed a commit to jsquyres/ompi that referenced this issue Sep 19, 2016
AUTHORS: Fix an errant reference to Subversion IDs
@adammoody
Copy link

@hppritcha we recently stumbled into this issue again. Any update here?

For now, I'm planning to hack configure to remove the --enable-new-dtags, but that's my ugly solution.

I'm hoping we could get a --disable-new-dtags configure option added to config/opal_setup_wrappers.m4 to do the same. Basically, the idea would be to skip running OPAL_SETUP_RUNPATH if --disable-new-dtags is thrown. I could post a PR for this. Just let me know. Thanks!

@hppritcha hppritcha self-assigned this Apr 19, 2017
@hppritcha
Copy link
Member Author

@adammoody let me know if the patch works

hppritcha added a commit to hppritcha/ompi that referenced this issue May 10, 2017
The --enable-new_dtags option for the compiler wrappers is
often great, but for some particular install/usage scenarios
causes issues.

This commit provides a new configury option to all for
use of rpath in the compiler wrappers, but disables the
use of --enable-new-dtags in the link line.

Fixes open-mpi#1089

Signed-off-by: Howard Pritchard <[email protected]>
hppritcha added a commit to hppritcha/ompi that referenced this issue May 10, 2017
The --enable-new-dtags option for the compiler wrappers is
often great, but for some particular install/usage scenarios
causes issues.

This commit provides a new configury option to use of rpath
in the compiler wrappers, but disables the
use of --enable-new-dtags in the link line.

Fixes open-mpi#1089

Signed-off-by: Howard Pritchard <[email protected]>
hppritcha added a commit to hppritcha/ompi that referenced this issue May 22, 2017
The --enable-new-dtags option for the compiler wrappers is
often great, but for some particular install/usage scenarios
causes issues.

This commit provides a new configury option to use of rpath
in the compiler wrappers, but disables the
use of --enable-new-dtags in the link line.

Fixes open-mpi#1089

Signed-off-by: Howard Pritchard <[email protected]>
hppritcha added a commit to hppritcha/ompi that referenced this issue May 22, 2017
The --enable-new-dtags option for the compiler wrappers is
often great, but for some particular install/usage scenarios
causes issues.

This commit provides a new configury option to use of rpath
in the compiler wrappers, but disables the
use of --enable-new-dtags in the link line.

The new configury option is

--enable-wrappers-runpath

To disable use of --enable-new-dtags in the wrappers, add

--disable-wrappers-runpath

to the Open MPI configury line.

Fixes open-mpi#1089

Signed-off-by: Howard Pritchard <[email protected]>
hppritcha added a commit to hppritcha/ompi that referenced this issue May 22, 2017
The --enable-new-dtags option for the compiler wrappers is
often great, but for some particular install/usage scenarios
causes issues.

This commit provides a new configury option to use of rpath
in the compiler wrappers, but disables the
use of --enable-new-dtags in the link line.

The new configury option is

--enable-wrappers-runpath

To disable use of --enable-new-dtags in the wrappers, add

--disable-wrappers-runpath

to the Open MPI configury line.

Fixes open-mpi#1089

Signed-off-by: Howard Pritchard <[email protected]>
@hppritcha
Copy link
Member Author

reopening issue because some sites are wanting this back ported to 3.x.y releases.

@hppritcha hppritcha reopened this Mar 26, 2019
@icdragn
Copy link

icdragn commented Mar 26, 2019

Isn't this already in 3.1.x? At least, the configure option is there...

@jsquyres
Copy link
Member

@hppritcha I think @icdragn is right:

$ pwd
/home/jsquyres/openmpi-releases/openmpi-3.0.3
$ ./configure --help |& grep rpath
  --enable-wrapper-rpath  enable rpath/runpath support in the wrapper

$ cd ../openmpi-3.1.3
$ ./configure --help |& grep rpath
  --enable-wrapper-rpath  enable rpath/runpath support in the wrapper
                          supports it (default: enabled, unless wrapper-rpath

Are you talking about something else?

@dshrader
Copy link

Actually, I think the configure parameter that @hppritcha is looking for is --enable-wrapper-runpath:

$ tar xjf openmpi-3.1.3.tar.bz2 
$ cd openmpi-3.1.3/
$ ./configure -h | grep -A 2 runpath
  --enable-wrapper-rpath  enable rpath/runpath support in the wrapper
                          compilers (default=yes)
  --enable-wrapper-runpath
                          enable runpath in the wrapper compilers if linker
                          supports it (default: enabled, unless wrapper-rpath
                          is disabled).

hppritcha added a commit to hppritcha/ompi that referenced this issue Mar 28, 2019
The --enable-new-dtags option for the compiler wrappers is
often great, but for some particular install/usage scenarios
causes issues.

This commit provides a new configury option to use of rpath
in the compiler wrappers, but disables the
use of --enable-new-dtags in the link line.

The new configury option is

--enable-wrappers-runpath

To disable use of --enable-new-dtags in the wrappers, add

--disable-wrappers-runpath

to the Open MPI configury line.

Fixes open-mpi#1089

Signed-off-by: Howard Pritchard <[email protected]>
(cherry picked from commit ebb30c1)
@hppritcha
Copy link
Member Author

@jsquyres you're right. the admin is wanting to install 3.0.x which apparently didn't get this patch

@jsquyres
Copy link
Member

jsquyres commented Oct 4, 2019

@hppritcha We're gearing up for v3.0.x and v3.1.x releases.

I confirm that this fix is in v3.0.x, but it is NOT in v3.1.x.

Did you want this in v3.1.x? If so, please file a PR ASAP.

Refs #7040

@hppritcha
Copy link
Member Author

@jsquyres i'll see into opening a pr for 3.1.x

hppritcha added a commit to hppritcha/ompi that referenced this issue Oct 5, 2019
The --enable-new-dtags option for the compiler wrappers is
often great, but for some particular install/usage scenarios
causes issues.

This commit provides a new configury option to use of rpath
in the compiler wrappers, but disables the
use of --enable-new-dtags in the link line.

The new configury option is

--enable-wrappers-runpath

To disable use of --enable-new-dtags in the wrappers, add

--disable-wrappers-runpath

to the Open MPI configury line.

Fixes open-mpi#1089

Signed-off-by: Howard Pritchard <[email protected]>
(cherry picked from commit ebb30c1)
hppritcha added a commit to hppritcha/ompi that referenced this issue Oct 7, 2019
The --enable-new-dtags option for the compiler wrappers is
often great, but for some particular install/usage scenarios
causes issues.

This commit provides a new configury option to use of rpath
in the compiler wrappers, but disables the
use of --enable-new-dtags in the link line.

The new configury option is

--enable-wrappers-runpath

To disable use of --enable-new-dtags in the wrappers, add

--disable-wrappers-runpath

to the Open MPI configury line.

Fixes open-mpi#1089

Signed-off-by: Howard Pritchard <[email protected]>
(cherry picked from commit ebb30c1)
hppritcha added a commit to hppritcha/ompi that referenced this issue Feb 18, 2020
Forgot to include a fix for the fortran test used to check if
new dtags is supported.

Related to open-mpi#7268
Related to open-mpi#6539 open-mpi#1089

This patch is already included on v4.0.x branch.

Signed-off-by: Howard Pritchard <[email protected]>
(cherry picked from commit 5354b9b)
@hppritcha
Copy link
Member Author

won't fix. not planning to release 3.0.x update unless there's something critical. and this issue doesn't fall into that category.

@cponder
Copy link

cponder commented Oct 8, 2024

The flag showed up with compiling OpenACC 5.0.5 on an ARM system running Rocky Linux release 9.3 (Blue Onyx) using the NVHPC 24.9 compiler:

nvfortran-Error-Unknown switch: --enable-new-dtags

I set these to bypass it

export  FCFLAGS=" -noswitcherror ..."
export  LDFLAGS=" -noswitcherror ..."

but it didn't show up in the failing phase. Is there some other place I need to put it, like -Wlink,-noswitcherror or something?
If i set --disable-wrapper-rpath I get this error

configure: error: --enable-wrapper-runpath cannot be selected with --disable-wrapper-rpath

though I'm not setting -enable-wrapper-runpath anywhere.

@cponder
Copy link

cponder commented Oct 8, 2024

Passing it as part of the compiler invocation worked:

export F90="nvfortran -noswitcherror"
export FC="nvfortran -noswitcherror"

Is there a variable that would do it, though? I tried LDFLAGS but it didn't show up in the linkage-line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants