Dne úterý 11. května 2021 16:16:18 CEST, Dominique Leuenberger / DimStar napsal(a):
On Tue, 2021-05-11 at 16:01 +0200, Christian Goll wrote:
Hello Vojtěch, the opempi package does not define the macro '%{_openmpi_load}', so oyu have to source the openmpi variables with:
%define mpi_ext 3 %define mpi_prefix %{_libdir}/mpi/gcc/openmpi%{?mpi_ext} source %{mpi_prefix}/bin/mpivars.sh
Have a look at libcircle for example. The main parts will be:
BuildRequires: openmpi-macros-devel
So there is nothing like Requires: openmpi ?
… %build %setup_openmpi # now configure/build as usual e.g. %configure make
%install %make_install
%check %setup_openmpi make check
%files …
The BuildRequires already takes care of pulling in the default openmpi implementation (on TW< currently openmpi4)
Thank You, like this https://paste.opensuse.org/79731623 it builds well locally. :-) It wasn't that hard as I expected. :-)
I have taken this example from the openfaom2012 [1] package and just hardcoded it to opempi2. In TW you can also use openmpi[234] on leap we have openmpi[23].
Plase, no hard-coding of openmpi versions: the distro has a declared default (that changed from 2 to 4 just recently) and there is metadata (openmpi) in place to have your packages follow such moves in the future. There are very few exceptions where this would not be appropriate. Cheers, Dominique -- Vojtěch Zeisek https://trapa.cz/
Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux https://www.opensuse.org/