Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1510557 - CMake prefix path for MPI environments
Summary: CMake prefix path for MPI environments
Alias: None
Product: Fedora
Classification: Fedora
Component: environment-modules
Version: 27
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
Depends On:
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:
Last Closed: 2018-03-06 10:18:39 UTC

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:


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.