应该由RPM-MPI-HOKS软件包完成。但是,我找不到有关应如何实际运行的任何信息。我当前生成的rpms尝试安装时给我这个错误
Problem 1: conflicting requests
- nothing provides libmpi.so.40()(64bit) needed by myrpm
libmpi.so.40()(64bit)(openmpi-x86_64)
的形式,但我的需要libmpi.so.40()(64bit)
Herey,Here
,
Here和
Here,通常指向Fedora指南,指向包装MPI
。
我尝试了很多事情,包括在.spec文件的许多斑点中使用宏观,我尝试将二进制重命名为末尾具有-MPI标记,或者将它们移至特定的MPI目录而没有成功。
通过制作特定文件的准则,我构建了一个非常简单的设置,其中实际代码是一个很小的Helloworld C ++代码。
使用cmakelists.txt:
cmake_minimum_required(VERSION 3.0)
project(HelloWorld)
add_executable(HWorld main.cxx)
set(CMAKE_INSTALL_PREFIX "/usr")
find_package(MPI REQUIRED)
include_directories(SYSTEM ${MPI_INCLUDE_PATH})
target_link_libraries(HWorld ${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES})
install(TARGETS HWorld DESTINATION bin)
和一个非常通用的.spec文件:
Name: HWorld
Version: 1
Release: 1%{?dist}
Summary: Test script with MPI
License: Test
Source0: https://www.example.com/%{name}/releases/%{name}-%{version}.tar.gz
%define debug_package %{nil}
BuildRequires: gcc
BuildRequires: make
%description
%prep
%setup -q
%build
%cmake
%cmake_build
%install
%cmake_install
%files
%{_bindir}/%{name}
%post
%changelog
* ...
这给我一个带有不良MPI的RPM需要标签:
$ rpmbuild -bb HWorld.spec
$ rpm -qp --requires HWorld-1-1.el9.x86_64.rpm
...
libmpi.so.40()(64bit)
通常最好从已经存在的事物中寻求灵感。,例如,EPEL提供的
vtk
cmake
构建的,取决于MPI。
here是样本
CMakeLists.txt
和
spec
文件(
openmpi
是硬编码,您通常想要构建一个适用于spec
和mpich
的文件
openmpi
这是
Name: helloworld
Version: 1.0
Release: 1%{?dist}
Summary: Test script with MPI
License: Test
Source0: https://www.example.com/%{name}/releases/helloworld-%{version}.tar.gz
%define debug_package %{nil}
BuildRequires: gcc
BuildRequires: cmake
%description
%prep
%setup -q
%build
%global \_vpath_builddir build-openmpi
%\_openmpi_load
%cmake
%cmake \\
-DCMAKE_PREFIX_PATH:PATH=$MPI_HOME \\
-DCMAKE_INSTALL_PREFIX:PATH=$MPI_HOME
%cmake_build
%install
%cmake_install
%package openmpi
BuildRequires: openmpi-devel
Summary: binaries built with openmpi
%description openmpi
%files openmpi
%{\_libdir}/openmpi/bin/%{name}
软件包的要求:
helloworld-openmpi