Bug 1510557 - CMake prefix path for MPI environments
Summary: CMake prefix path for MPI environments
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: environment-modules
Version: 27
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-07 16:35 UTC by Darcy
Modified: 2018-03-06 10:18 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-06 10:18:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Darcy 2017-11-07 16:35:24 UTC
Description of problem:

When using CMake as the build system with an MPI module active (openmpi or mpich), the find_package() command in CMake does not locate the MPI-enabled packages installed through dnf but defaults to the serial versions.

This means that the non-MPI libraries have their include and library paths set and result in compilation / linking errors.  Setting the CMake prefix through an environment variable:

export CMAKE_PREFIX_PATH=/usr/lib64/openmpi/lib 

will tell CMake to look inside the correct location.

Version-Release number of selected component (if applicable):

Current stacks with Fedora 26 and 27

How reproducible:

Always.

Additional info:

A potential problem is when an MPI module is enabled and a user tries to compile a serial version.  This would result in CMake finding the parallel version from the prefix rather than the serial version and could lead to extra confusion.  Maybe less however than accidently leaving an environment variable set.

Comment 1 Xavier Delaruelle 2018-02-15 19:39:52 UTC
This bug should be affected to the relative MPI packages, not environment-modules, as these packages provide the modulefiles referred here.

Comment 2 Darcy 2018-03-06 10:18:39 UTC
I have already submitted this against the relevant MPI packages.  Closing this here.


Note You need to log in before you can comment on or make changes to this bug.