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

Cannot run /bin/mpirun #5613

Closed
cbordage opened this issue Aug 28, 2018 · 10 comments
Closed

Cannot run /bin/mpirun #5613

cbordage opened this issue Aug 28, 2018 · 10 comments

Comments

@cbordage
Copy link

When I run /bin/mpirun, I get the following error

A prefix was supplied to mpirun that only contained slashes.

But if I run mpirun, it works.

On my distribution (archlinux), which mpirun returns /bin/mpirun (/bin is a symbolic link to /usr/bin).

@jsquyres
Copy link
Member

What version of Open MPI are you using?

@bgoglin
Copy link
Contributor

bgoglin commented Aug 28, 2018

He was using 3.1.1 but the relevant code seemed identical in master.

@jsquyres
Copy link
Member

This is likely a simple string parsing problem. Any chance you can look into it?

@rhc54
Copy link
Contributor

rhc54 commented Aug 30, 2018

When you specify a full path to mpirun, OMPI considers that as equivalent to passing --prefix on the cmd line. Probably an issue of parsing that option incorrectly - it isn't used or tested much.

@jsquyres
Copy link
Member

FWIW, I use /path/to/mpirun all the time. 😁

But there's probably some corner case in the string parsing that isn't handled properly (e.g., in the case of /bin/mpirun, the prefix is just /, which is what mpirun is nominally complaining about).

@ggouaillardet
Copy link
Contributor

/bin is always trimmed from the end of the prefix.

For example /usr/bin/mpirun -> prefix is /usr

In this case, /bin/mpirun -> prefix is / -> abort.

@jsquyres @rhc54 @bosilca @hjelmn any recollection on why we abort when the prefix is / ?

If mpirun is in /bin/mpirun, what should be the prefix ? / (and no abort) ? /bin ? something else ?

@rhc54
Copy link
Contributor

rhc54 commented Aug 31, 2018

I think the prefix would have to be / and we shouldn't abort. This assumes that the libraries will be under /lib or /lib64 etc. I'm not sure what to do if they were put somewhere else - in this case, there is a symlink used to point at the real location in /usr, so it is possible the corresponding symlinksfor libraries wasn't made. Suspect we'd just have to declare that a busted environment.

@jsquyres
Copy link
Member

jsquyres commented Sep 1, 2018

Yeah, I'm not really sure why we have that error (i.e., that there's a prefix that is only /). That might just be over-zealous...?

@AntoineMazuyer
Copy link

Hi all,

I also have the same issue using Manjaro (arch based) distribution. I am not sure a busted environment is to blame.

@lahwaacz
Copy link
Contributor

The /bin -> /usr/bin symlink in Arch provides compatibility for things which hardcode paths through /bin. The which tool is not such thing - if which mpirun produces /bin/mpirun, it's because you have /bin in your $PATH. If you remove it, then which mpirun produces /usr/bin/mpirun. Also note that the default $PATH in Arch is just /usr/local/sbin:/usr/local/bin:/usr/bin.

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

No branches or pull requests

8 participants