MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0014347 | CMake | Modules | public | 2013-08-09 10:37 | 2015-01-05 08:39 |
|
Reporter | Marcel Loose | |
Assigned To | Brad King | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | Linux | OS | Ubuntu | OS Version | 13.04 |
Product Version | CMake 2.8.11.2 | |
Target Version | CMake 3.1 | Fixed in Version | CMake 3.1 | |
|
Summary | 0014347: FindMPI sets MPIEXEC to wrong executable |
Description | When MPI is installed in a non-standard location (which is the rule, rather than the exception on cluster systems), FindMPI will not find the correct mpiexec.
Though you can help FindMPI to find the correct compilers, by setting MPI_<lang>_COMPILER variables, there's no way to do this for MPIEXEC.
|
Steps To Reproduce | 1. Have MPI installed in a non-standard directory, e.g., /opt/openmpi
2. Create a CMakeLists.txt file that contains a line "find_package(MPI)"
3. Check the cache for the value of the different MPI variables |
Additional Information | I think that the CMake|environment variable MPI_HOME should be used as HINTS in the call of find_program for mpiexec. Subsequently, _MPI_BASE_DIR (as derived from the path to mpiexec) can be used as HINTS in the call of find_program of the MPI compiler(s).
I've attached a patch that solves this problem. |
Tags | No tags attached. |
Relationships | |
Attached Files | FindMPI.patch (829) 2013-08-09 10:37 https://public.kitware.com/Bug/file/4845/FindMPI.patch |
|
Issue History |
Date Modified | Username | Field | Change |
2013-08-09 10:37 | Marcel Loose | New Issue | |
2013-08-09 10:37 | Marcel Loose | File Added: FindMPI.patch | |
2013-08-09 10:38 | Marcel Loose | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=1233#r1233 |
2014-08-05 17:27 | Ryo IGARASHI | Note Added: 0036558 | |
2014-08-11 11:11 | Brad King | Note Added: 0036593 | |
2014-08-11 11:40 | Marcel Loose | Note Added: 0036594 | |
2014-08-11 11:52 | Brad King | Note Added: 0036595 | |
2014-08-11 11:52 | Brad King | Target Version | => CMake 3.1 |
2014-08-11 13:08 | Brad King | Note Added: 0036598 | |
2014-08-11 13:08 | Brad King | Assigned To | => Brad King |
2014-08-11 13:08 | Brad King | Status | new => assigned |
2014-08-12 04:04 | Marcel Loose | Note Added: 0036600 | |
2014-08-12 09:33 | Brad King | Note Added: 0036602 | |
2014-08-12 14:06 | Brad King | Note Added: 0036605 | |
2014-08-18 11:13 | Brad King | Status | assigned => resolved |
2014-08-18 11:13 | Brad King | Resolution | open => fixed |
2014-08-18 11:13 | Brad King | Fixed in Version | => CMake 3.1 |
2015-01-05 08:39 | Robert Maynard | Note Added: 0037614 | |
2015-01-05 08:39 | Robert Maynard | Status | resolved => closed |
Notes |
|
(0036558)
|
Ryo IGARASHI
|
2014-08-05 17:27
|
|
I have been suffering from this issue, too.
On Fujitsu K computer or FX10 system, we cross-compile our application on the
front end(x86_64) for the SPARC(s64fx) back end.
MPI environment (mpirun/mpiexec) only works on the back end, therefore,
executing mpiexec on the front end (where we execute cmake command) always fails
and MPIEXEC is set to MPIEXEC-NOTFOUND.
As a workaround, I am forced to create a symlink of working mpiexec to
~/bin/MPIEXEC-NOTFOUND where I always add ~/bin to my PATH, which I believe
is very ugly.
I want MPIEXEC to be able to set manually such as CMAKE_COMMAND or CMAKE_CTEST_COMMAND variable. |
|
|
(0036593)
|
Brad King
|
2014-08-11 11:11
|
|
The CMAKE_PREFIX_PATH variable may be set to a ;-separated list containing any local custom installation prefixes. They will be used by all find modules including FindMPI. This avoids the need for a per-package _HOME or _ROOT variable, which is why so few find modules provide them. |
|
|
(0036594)
|
Marcel Loose
|
2014-08-11 11:40
|
|
Ryo, have you tried the patch I uploaded? If that works for you, then maybe it can be applied to FindMPI.cmake in the repo. |
|
|
(0036595)
|
Brad King
|
2014-08-11 11:52
|
|
I just noticed that the attached FindMPI.patch simply extends existing use of MPI_HOME to work for MPIEXEC too rather than adding a new one. My advice in 0014347:0036593 can serve as a workaround but the patch is still worth testing too. |
|
|
(0036598)
|
Brad King
|
2014-08-11 13:08
|
|
|
|
(0036600)
|
Marcel Loose
|
2014-08-12 04:04
|
|
Brad, I saw you removed the quotes around the variable names in the applied patch. Out of curiosity, shouldn't I use quotes? I thought you need them to properly handle file paths containing spaces. |
|
|
(0036602)
|
Brad King
|
2014-08-12 09:33
|
|
Re 0014347:0036600: I wanted to match the style in the rest of the module. Also if the values are empty then leaving out the quotes causes the argument to be removed rather than an empty string used. |
|
|
(0036605)
|
Brad King
|
2014-08-12 14:06
|
|
|
|
(0037614)
|
Robert Maynard
|
2015-01-05 08:39
|
|
Closing resolved issues that have not been updated in more than 4 months |
|